You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered a scenario where the Page Builder's HTML content can become corrupted, leading to potential runtime errors in the script responsible for handling HTML elements. Specifically, the issue arises from the code segment designed to apply styles by setting attributes on elements selected via a CSS selector. When the expected HTML element is absent (null), attempting to call setAttribute on it directly causes the entire Page Builder to halt, preventing users from further editing their pages.
To enhance the resilience of the Page Builder and ensure that such HTML content issues do not disrupt the editing process, I propose adding a simple existence check for the element before attempting to call setAttribute on it. This small safeguard will allow the rest of the Page Builder's functionality to continue operating normally, even if specific elements are not found, thereby improving the user experience and stability of the editor in edge cases.
Implementing this change could significantly reduce the impact of content errors on the Page Builder's usability, ensuring that clients can continue editing their pages without interruption.
This rewrite aims to clearly describe the issue, its impact on the user experience, and propose a specific solution, making it easier for the Magento development team to understand and address the problem.
The text was updated successfully, but these errors were encountered:
Hi @Stevie-Ray. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this
I've encountered a scenario where the Page Builder's HTML content can become corrupted, leading to potential runtime errors in the script responsible for handling HTML elements. Specifically, the issue arises from the code segment designed to apply styles by setting attributes on elements selected via a CSS selector. When the expected HTML element is absent (null), attempting to call setAttribute on it directly causes the entire Page Builder to halt, preventing users from further editing their pages.
The code segment can be found here:
magento2-page-builder/app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/stage-builder.ts
Line 64 in 9f615d8
To enhance the resilience of the Page Builder and ensure that such HTML content issues do not disrupt the editing process, I propose adding a simple existence check for the element before attempting to call setAttribute on it. This small safeguard will allow the rest of the Page Builder's functionality to continue operating normally, even if specific elements are not found, thereby improving the user experience and stability of the editor in edge cases.
Implementing this change could significantly reduce the impact of content errors on the Page Builder's usability, ensuring that clients can continue editing their pages without interruption.
This rewrite aims to clearly describe the issue, its impact on the user experience, and propose a specific solution, making it easier for the Magento development team to understand and address the problem.
The text was updated successfully, but these errors were encountered: