Closed artttj closed 2 weeks ago
@magento run all tests
@magento run all tests
After discussing it internally, it was found that the automated test is not required for this change. Hence moving it to ready for testing.
Thanks
Hello @artttj,
Thanks for the contribution!
:x: QA not Passed
We have tried to reproduce the actual issue in the 2.4-develop branch with pagebuilder's develop branch, but the issue is not reproducible for us. Please refer to the below screencast for reference:
https://github.com/user-attachments/assets/38e9a8ff-1cca-42c4-9bba-6856b17995f1
Let us know if we missed anything.
Thanks
Hello @artttj,
This PR is being closed since it has not been updated in a long time. Please feel free to reopen or raise a new PR.
Thanks
Description
We encountered a scenario where missing HTML elements in Page Builder led to runtime errors due to direct calls to
setAttribute
.To address this, we added an existence check before setting attributes. This change prevents the editor from breaking and improves stability by handling cases where elements are missing.
Ideally, the core should include such checks to enhance overall resilience and user experience.
Story
N/A
Bug
N/A
Task
N/A
Fixed Issues
Builds
N/A
Related Pull Requests
N/A
Manual Testing Scenarios
Please test the following scenarios to verify the changes:
Remove
data-pb-style
Attribute:data-pb-style
attribute from an element with applied styles.Modify
data-pb-style
Hash:data-pb-style
attribute's value to a non-relevant hash.Remove HTML Element:
Note: This issue was observed when using the DeepL API, but similar problems might occur in other scenarios. The preview editor should remain stable.
Questions or comments
N/A
Checklist