magento2-page-builder icon indicating copy to clipboard operation
magento2-page-builder copied to clipboard

Ignore styles which no longer apply

Open fredden opened this issue 3 years ago • 12 comments
trafficstars

Description

When PageBuilder initialises, it moves styles from a

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

  • [x] Pull request has a meaningful description of its purpose
  • [x] All commits are accompanied by meaningful commit messages
  • [ ] All new or changed code is covered with unit/integration tests (if applicable)
  • [x] README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • [x] All automated tests passed successfully (all builds are green)

Resolved issues:

  1. [x] resolves magento/magento2-page-builder#863: Ignore styles which no longer apply

fredden avatar Mar 02 '22 12:03 fredden

@magento run all tests

paras89 avatar Jun 20 '22 13:06 paras89

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@fredden - can you pull develop branch into your fork's branch and fix a failing static test? After that we should be good to merge this PR!

paras89 avatar Jun 21 '22 09:06 paras89

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@magento run Functional Tests B2B

paras89 avatar Jun 27 '22 10:06 paras89

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@magento run Functional Tests B2B

paras89 avatar Jul 28 '22 14:07 paras89

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@magento run all tests

engcom-Hotel avatar Feb 13 '24 13:02 engcom-Hotel

@magento create issue

engcom-Hotel avatar Feb 13 '24 13:02 engcom-Hotel

@magento run all tests

engcom-Hotel avatar Jul 24 '24 07:07 engcom-Hotel

Hi @fredden,

Thanks for the collaboration & contribution!.

We have verified the issue in Latest 2.4-develop instance and the issue is not reproducible.Kindly refer the attached video.

Manual testing scenarios

  • 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, Sample text)
  • Navigate to this product in the admin.
  • 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).

https://github.com/user-attachments/assets/ae9d8699-b3d0-402c-8953-627ee6d1649d

After importing the product with the description we are able to save the product successfully.

Could you please try to reproduce the issue in Latest 2.4-develop instance and could you please let us know if we are still missing anything.

Thanks.

engcom-Bravo avatar Jul 25 '24 10:07 engcom-Bravo

Hi @fredden,

Thank you for your contribution!

As mentioned here https://github.com/magento/magento2-page-builder/pull/804#issuecomment-2250045772, please have a look and let us know if we are missing anything.

Till then closing this PR. Please feel free to reopen it as you want to update further.

Thank you!

engcom-Bravo avatar Aug 05 '24 09:08 engcom-Bravo