Skip to:
Content

BuddyPress.org

Opened 10 months ago

Closed 9 months ago

Last modified 4 months ago

#8412 closed defect (bug) (fixed)

moment construction falls back to js Date()

Reported by: vapvarun Owned by:
Milestone: 7.1.0 Priority: normal
Severity: normal Version:
Component: Core Keywords: needs-patch
Cc:

Description

Deprecation warning: value provided is not in a recognized ISO format. Moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to โ€‹http://momentjs.com/guides/#/warnings/js-date/ for more info.

Inside the browser console, at the sitewide activity page.
Test case with default wp theme using BP v7.0.0 + WP v5.6
โ€‹https://drive.google.com/file/d/15Lsx2371jcHPCeipdFuvNfg6obpDP4p-/view?usp=sharing
file path /buddypress/bp-core/js/vendor/moment-js/moment.min.js?ver=7.0.0

Change History (7)

#1 @imath
10 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 7.1.0

Thanks for catching it @vapvarun ๐Ÿ‘Œ Iโ€™ll look at it asap to understand why this notice is triggered.

#2 @imath
10 months ago

  • Keywords reporter-feedback added

I can't reproduce and it shouldn't happen as dates are ISO formatted using bp_core_get_iso8601_date(). Weird ๐Ÿคจ! Could you try to find the problematic activity to see what is the value of the corresponding data-livestamp attribute.

https://cldup.com/LKU3jnwbOk.png

PS: You'll need to look into the Ajax response from the Network tab of your browser's inspector as shown above.

#3 @vapvarun
9 months ago

double-checked this one, it was due to the default data plugin โ€‹https://wordpress.org/plugins/bp-default-data

#4 @vapvarun
9 months ago

double-checked this one, it was due to the default data plugin โ€‹https://wordpress.org/plugins/bp-default-data

This ticket was mentioned in โ€‹Slack in #buddypress by vapvarun. โ€‹View the logs.


9 months ago

#6 @imath
9 months ago

  • Keywords reporter-feedback removed

Ok, thanks a lot for your feedback I'll give it another look with this plugin active ;)

#7 @imath
9 months ago

  • Resolution set to fixed
  • Status changed from new to closed

I've just checked BP Default data and wasn't able to reproduce. Looks like it's a mystery ๐Ÿ˜‰. Let's close the ticket as anyway it doesn't seem to be caused by BuddyPress.

Note: See TracTickets for help on using tickets.