Skip to:

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#8412 closed defect (bug) (fixed)

moment construction falls back to js Date()

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


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 โ€‹ 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
file path /buddypress/bp-core/js/vendor/moment-js/moment.min.js?ver=7.0.0

Change History (7)

#1 @imath
2 years 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
2 years 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.

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

#3 @vapvarun
2 years ago

double-checked this one, it was due to the default data plugin โ€‹

#4 @vapvarun
2 years ago

double-checked this one, it was due to the default data plugin โ€‹

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

2 years ago

#6 @imath
2 years ago

  • Keywords reporter-feedback removed

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

#7 @imath
2 years 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.