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

[Issue] Ignore styles which no longer apply #863

Open
4 of 5 tasks
m2-assistant bot opened this issue Feb 13, 2024 · 0 comments · May be fixed by #804
Open
4 of 5 tasks

[Issue] Ignore styles which no longer apply #863

m2-assistant bot opened this issue Feb 13, 2024 · 0 comments · May be fixed by #804
Assignees
Projects

Comments

@m2-assistant
Copy link

m2-assistant bot commented Feb 13, 2024

This issue is automatically created based on existing pull request: #804: Ignore styles which no longer apply


Description

When PageBuilder initialises, it moves styles from a <style> tag into data-{viewport}-styles attributes. If there are CSS selectors that do not match any elements, an error is thrown:

Screenshot_2022-03-02_11-17-34

This pull request fixes this bug.

Manual testing scenarios

  1. Use Magento import tool to set a product description (or other Page Builder-enabled attribute) which contains HTML, including some CSS that does not match any elements. (eg, <span>Sample text</span><style>#not-found { color: red; }</style>)
  2. Navigate to this product in the admin.
  3. Witness that Page Builder fails to initialise for this field, and saving the product is impossible (due to a different JavaScript error which stems from the same root cause).
  4. Apply the changes in this pull request.
  5. Witness that Page Builder initialises as expected, and it is possible to save the product.

Checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)
@m2-assistant m2-assistant bot added the Priority: P1 Priority: P1 label Feb 13, 2024
@m2-assistant m2-assistant bot linked a pull request Feb 13, 2024 that will close this issue
6 tasks
@m2-community-project m2-community-project bot added this to Pull Request In Progress in Backlog Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Backlog
  
Pull Request In Progress
Development

Successfully merging a pull request may close this issue.

1 participant