Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time format error using H:i format in the editor’s datepicker #27246

Closed
audrasjb opened this issue Nov 24, 2020 · 5 comments · Fixed by #27316
Closed

Time format error using H:i format in the editor’s datepicker #27246

audrasjb opened this issue Nov 24, 2020 · 5 comments · Fixed by #27316
Assignees
Labels
General Interface Parts of the UI which don't fall neatly under other labels. [Status] In Progress Tracking issues with work in progress [Type] Regression Related to a regression in the latest release

Comments

@audrasjb
Copy link
Contributor

Describe the bug
See the related ticket: https://core.trac.wordpress.org/ticket/51862

To reproduce
Steps to reproduce the behavior:

  1. Open the [Settings]-[General] menu.
  2. Select "H:i" in Time Format and save.
  3. Edit "Hello world!" In the posted article.
  4. Click the date and time in "Publish" of "Status & visibility".
  5. Click "Reset" in the displayed calendar.
  6. Click "Immediately".
  7. Clicking "Date" or "Calendar Help" in the calendar causes an error.

Error:

TypeError: r is not a function
    at http://localhost:8888/wordpress-develop/wordpress-develop/build/wp-includes/js/dist/components.min.js?ver=7b2eb7033cd3c6d2b4ea663e7d4774a7:7:311452
    at Bh (http://localhost:8888/wordpress-develop/wordpress-develop/build/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.13.1:126:456)
    at Dj (http://localhost:8888/wordpress-develop/wordpress-develop/build/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.13.1:162:476)
    at unstable_runWithPriority (http://localhost:8888/wordpress-develop/wordpress-develop/build/wp-includes/js/dist/vendor/react.min.js?ver=16.13.1:25:260)
    at Da (http://localhost:8888/wordpress-develop/wordpress-develop/build/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.13.1:60:280)
    at xb (http://localhost:8888/wordpress-develop/wordpress-develop/build/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.13.1:162:231)
    at mk.Events.current (http://localhost:8888/wordpress-develop/wordpress-develop/build/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.13.1:236:102)
    at Ei (http://localhost:8888/wordpress-develop/wordpress-develop/build/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.13.1:41:59)

Editor version (please complete the following information):

  • WordPress version: WP 5.6 RC 1
  • Using default block editor, no plugin

Desktop (please complete the following information):

  • OS: Mac OSX
  • Browser: Chrome
@talldan talldan added [Type] Regression Related to a regression in the latest release General Interface Parts of the UI which don't fall neatly under other labels. labels Nov 25, 2020
@talldan
Copy link
Contributor

talldan commented Nov 25, 2020

This looks like a regression when I tested. I couldn't reproduce in 5.5.3, but could in the latest 5.6.

@audrasjb
Copy link
Contributor Author

Thanks for testing and properly milestoning the issue 🙌

@talldan
Copy link
Contributor

talldan commented Nov 26, 2020

Just noting that the same error was reported in #27278, but with different reproduction steps.

@tellthemachines
Copy link
Contributor

tellthemachines commented Nov 26, 2020

Just noting that the same error was reported in #27278, but with different reproduction steps.

That error message seems to appear whenever the editor errors and the "copy error" button is clicked. In my dev environment it appears as Uncaught TypeError: onCopy is not a function, and it occurs in the <ClipboardButton> component.

The actual error caused by the bug this issue reports is TypeError: 'month' must be a valid moment object, in the <CalendarMonth> component. I've traced it back to #24348, but because that was a fairly large refactor I'm still working on identifying the exact cause 😩

@tellthemachines
Copy link
Contributor

Also, I can reproduce this bug with any date/time settings: after clicking "Reset", and reopening the calendar component, unfocusing the month picker causes a crash. It happens because date and time values become invalid when reset for some reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
General Interface Parts of the UI which don't fall neatly under other labels. [Status] In Progress Tracking issues with work in progress [Type] Regression Related to a regression in the latest release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants