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

fix: editor crash when switching months in event dates block #123

Merged
merged 1 commit into from
Sep 17, 2021

Conversation

dkoo
Copy link
Contributor

@dkoo dkoo commented Sep 16, 2021

All Submissions:

Changes proposed in this Pull Request:

Fixes a crash in the DatePicker component that was introduced in WP 5.8. It's been fixed in the Gutenberg plugin but apparently not yet in WP Core. This fix avoids the use of DatePicker and uses DateTimePicker (which isn't affected by this bug) even when not using times in the block.

How to test the changes in this Pull Request:

  1. Ensure your test site is running WP 5.8+ but NOT the Gutenberg plugin.
  2. On master, create an Event listing. In the Event Date block, disable "Show Times" and enable "Show End Date".
  3. Attempt to change the month of the end date and observe a JS crash: TypeError: t.onMonthPreviewed is not a function
  4. Check out this branch, repeat steps 1-2, confirm that the crash is avoided and that the event date ranges still render as expected on the front-end based on step 10 in Event dates block and sort UI #12.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@dkoo dkoo added bug Something isn't working [Status] Needs Review labels Sep 16, 2021
@dkoo dkoo requested a review from a team September 16, 2021 17:37
@dkoo dkoo self-assigned this Sep 16, 2021
Copy link
Member

@miguelpeixe miguelpeixe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@dkoo dkoo merged commit cee0d53 into master Sep 17, 2021
@dkoo dkoo deleted the fix/event-dates-crash branch September 17, 2021 21:18
matticbot pushed a commit that referenced this pull request Sep 21, 2021
# [2.5.0-alpha.2](v2.5.0-alpha.1...v2.5.0-alpha.2) (2021-09-21)

### Bug Fixes

* editor crash when switching months in event dates block ([#123](#123)) ([cee0d53](cee0d53))
* fatal error when WooCommerce Subscriptions is not active ([#122](#122)) ([16ac166](16ac166))

### Features

* feature extensions from gdg ([#120](#120)) ([b2c3cc8](b2c3cc8))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 2.5.0-alpha.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Sep 21, 2021
# [2.5.0](v2.4.0...v2.5.0) (2021-09-21)

### Bug Fixes

* editor crash when switching months in event dates block ([#123](#123)) ([cee0d53](cee0d53))
* fatal error when WooCommerce Subscriptions is not active ([#122](#122)) ([16ac166](16ac166))

### Features

* feature extensions from gdg ([#120](#120)) ([b2c3cc8](b2c3cc8))
* **ugc:** automated WC products for self-serve listings ([#117](#117)) ([6a44d86](6a44d86))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 2.5.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants