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

[ET-2293] Alias Moment for react-day-picket #2379

Open
wants to merge 7 commits into
base: release/T25.adamwarlock.1
Choose a base branch
from

Conversation

redscar
Copy link
Contributor

@redscar redscar commented Feb 6, 2025

Putting a Hold on PR in favor of

🎫 Ticket

ET-2293

🗒️ Description

This issue mainly occurred on versions of WordPress lower than 7.2. When you would edit an event on the block editor that contained the ticket block using ET 5.18, and then update ET to 5.19 and edit the same event, the block would throw an error.

Uncaught TypeError: modules[moduleId] is undefined
    __webpack_require__ https://optimistic-rook-b2a876.instawp.xyz/wp-content/plugins/event-tickets/build/Tickets/Blocks/Ticket/editor.js?ver=6.5.2:80

Upon inspection this was due to webpack not being able to find ./node_modules/react-day-picker/moment/index.js.

The issue is that we recently updated react-day-picker to version 9, in which it dropped support for Moment. So that file was not there.

The fix I implemented mapped the actual Moment package to the react-day-picker/moment directory.

🎥 Artifacts

Screencast.from.02-06-2025.11.31.40.AM.webm

✔️ Checklist

  • Ran npm run changelog to add changelog file(s). More info here
  • Code is covered by NEW wpunit or integration tests.
  • Code is covered by EXISTING wpunit or integration tests.
  • Are all the required tests passing?
  • Automated code review comments are addressed.
  • Have you added Artifacts?
  • Check the base branch for your PR.
  • Add your PR to the project board for the release.

@redscar redscar added the hold Status: on hold–do not proceed with other status items. label Feb 6, 2025
@redscar redscar self-assigned this Feb 6, 2025
@redscar redscar requested a review from bordoni February 6, 2025 16:38
@redscar redscar changed the base branch from master to release/T25.adamwarlock.1 February 6, 2025 16:49
@redscar redscar changed the title Tweak/fix moment js node [ET-2293] Alias Moment for react-day-picket Feb 6, 2025
@redscar redscar added code review Status: requires a code review. and removed hold Status: on hold–do not proceed with other status items. labels Feb 6, 2025
@redscar redscar marked this pull request as ready for review February 6, 2025 16:53
@redscar redscar requested a review from Camwyn February 6, 2025 20:40
@@ -54,3 +54,4 @@
/vendor/woocommerce/action-scheduler/**/*.php
/node_modules/php-date-formatter/js/php-date-formatter.js
/node_modules/php-date-formatter/js/php-date-formatter.min.js
/node_modules/moment/dist/*.js
Copy link
Member

Choose a reason for hiding this comment

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

Until the bug on pup is fixed, this will probably need to go into the .distfiles of parent plugins as well. ET and TEC.

@redscar redscar added hold Status: on hold–do not proceed with other status items. and removed code review Status: requires a code review. labels Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hold Status: on hold–do not proceed with other status items.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants