-
Notifications
You must be signed in to change notification settings - Fork 67
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
Page Builder polutes the frontend HTML markup with attributes that are only needed for the adminhtml area #610
Comments
Hi @ericmorand. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. Please, add a comment to assign the issue:
🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@davemacaulay can you give some comments on this |
@mrtuvn it would also be very helpful if we could have a workaround. I know that this issue won't be solved anytime soon - it probably requires a huge refactoring of the way Page Builder works - but I think there may be a way to avoid the issue. I'm thinking about some sort of filtering before the HTML markup is sent to the renderer. This way, the HTML markup would remain "poluted" in the database (ensuring that it works with the back-office) but would be cleaned before rendered as part of the page. I'm investigating this point on my own project. But if someone has an idea to point me in the right direction, I'd be very glad. :) |
From frontend view i don't like PB sometimes when i need to copy/paste data around in backend. Hard to edit/modify content like before. In some case if no specific class will be hard to styling child content inside PB components. From frontend some extra divs generated by code can take you extra time to figure some issues around . Other hand i love PB in the way make user easier to build their contents without need knowledge html |
Hi @ericmorand. Thank you for your report. Please, add a comment to assign the issue:
|
Hi @ericmorand. Thanks for your contribution. So, we are using |
We actually use the |
Do I understand correctly that it is about these wrappers? <div data-content-type="html" data-appearance="default" data-element="main">
... It appears after cms page save in Magento 2.4.3. () It's problem for me also because it breaks my custom data-content-type (s) for my PWA-studio package. <div data-content-type="html" data-appearance="default" data-element="main">
<div >
{{widget type="S\Slider\Block\Slider" identifier="_home"}} </div>
</div> where the widget has its own data-content-type="easyslider" for example so now after saving the page I must directly remove the wrapper. |
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
Why is it happening and why this is a flaw
This is happening because the back-office parse the front-office HTML markup to construct the UI of the Page Builder. It means that those data- attributes need to be present in the rendered HTML markup for the back-office to function. Removing these attributes from master.html template for example makes the back-office crash.
This is a design flaw. It forces the front-office markup to contain some informations that are not needed by neither the front-office content layer not the front-office style layer. Those informations should not be there since they serve no purpose. They can even be detrimental in case the front-office has styling for those attributes because they are used on some templates that are part of a custom Magento theme. Basically, they force the theme providers to consider that these 3 data- attributes are reserved to the system and should not be used to provide styling and/or behavior.
I believer that it needs to be fixed ASAP. Until then, the Page Builder is basically unusable for professionals that want reliability and have full control on the HTML markup of the front-office they provide to their customers.
The text was updated successfully, but these errors were encountered: