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 activeThemeHasMods undefined error #45255

Conversation

gigitux
Copy link
Contributor

@gigitux gigitux commented Mar 1, 2024

Submission Review Guidelines:

Changes proposed in this Pull Request:

This PR fixes the activeThemeHasMods undefined error. This issue happened because the iframe loads the entire CYS application (and all the state machines): this means that the iframe instance will have different state machines than the parent window.

For this reason, it is necessary set the sendEvent function in the window object because it is necessary send the event to the main Intro state machine.

Closes #45221.

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

  1. Enable the WooCommerce Beta Tester plugin if you don't have it enabled yet.
  2. On your Dashboard, head over to Tools > WCA Test Helper > Features and enable the customize-store.
  3. Visit the /wp-admin/admin.php?page=wc-admin&path=/customize-store.
  4. Follow the process.
  5. Click on the arrow on the top left near the "Let's get creative" label.
  6. Click on "exit and lose changes".
  7. Click on "Start Designing"
  8. Ensure that the Assembler is loaded.

JN Installation

  1. Create a new WooCommerce installation with this version.
  2. Ensure Jetpack is installed and your site is connected with JP.
  3. Ensure the WooCommerce Beta Tester plugin is installed and activated (available on this monorepo).
  4. Ensure the Woo AI plugin is installed and activated (available on this monorepo).
  5. Head over to /wp-admin/tools.php?page=woocommerce-admin-test-helper and enable customize-store feature flag.
  6. Head over to WooCommerce -> Home and click on "Start Customizing".
  7. Follow the steps 3-9 of the above testing instructions.

Changelog entry

  • Automatically create a changelog entry from the details below.

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

CYS - Fix activeThemeHasMods undefined error.

Comment

@gigitux gigitux self-assigned this Mar 4, 2024
Copy link
Contributor

github-actions bot commented Mar 4, 2024

Test Results Summary

Commit SHA: 4cf03ca

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 37s
E2E Tests335001603517m 11s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

github-actions and others added 3 commits March 4, 2024 11:21
…efined-reading-activethemehasmods' of github.com:woocommerce/woocommerce into 45221-cys-core-cannot-read-properties-of-undefined-reading-activethemehasmods
@gigitux gigitux changed the title [WIP] Fix activeThemeHasMods undefined error Fix activeThemeHasMods undefined error Mar 4, 2024
@gigitux gigitux added focus: customize-your-store Issues related to the Customize Your Store onboarding flow. team: Kirigami & Origami type: bug The issue is a confirmed bug. labels Mar 4, 2024
@gigitux gigitux marked this pull request as ready for review March 4, 2024 11:27
@woocommercebot woocommercebot requested review from a team and nefeline and removed request for a team March 4, 2024 11:27
Copy link
Contributor

github-actions bot commented Mar 4, 2024

Hi @albarin, @nefeline,

Apart from reviewing the code changes, please make sure to review the testing instructions as well.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

@gigitux gigitux requested a review from albarin March 4, 2024 11:31
Copy link
Contributor

@albarin albarin left a comment

Choose a reason for hiding this comment

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

Good job 🙇
Confirmed on both environments the error is not happening anymore 👌

…-cys-core-cannot-read-properties-of-undefined-reading-activethemehasmods
@gigitux gigitux enabled auto-merge (squash) March 4, 2024 13:18
@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Mar 4, 2024
@gigitux gigitux merged commit 6a30974 into trunk Mar 4, 2024
25 of 26 checks passed
@gigitux gigitux deleted the 45221-cys-core-cannot-read-properties-of-undefined-reading-activethemehasmods branch March 4, 2024 19:09
@github-actions github-actions bot added this to the 8.8.0 milestone Mar 4, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Mar 4, 2024
thealexandrelara pushed a commit that referenced this pull request Mar 4, 2024
* Fix activeThemeHasMods undefined error

* remove comment

* fix naming

* improve comment

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
@alvarothomas alvarothomas added needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. status: analysis complete Indicates if a PR has been analysed by Solaris and removed needs: analysis Indicates if the PR requires a PR testing scrub session. labels Mar 5, 2024
Konamiman pushed a commit that referenced this pull request Mar 13, 2024
* Fix activeThemeHasMods undefined error

* remove comment

* fix naming

* improve comment

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: customize-your-store Issues related to the Customize Your Store onboarding flow. needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. plugin: woocommerce Issues related to the WooCommerce Core plugin. status: analysis complete Indicates if a PR has been analysed by Solaris team: Kirigami & Origami type: bug The issue is a confirmed bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CYS - Core: Cannot read properties of undefined (reading 'activeThemeHasMods')
3 participants