Skip to content

Page Builder polutes the frontend HTML markup with attributes that are only needed for the adminhtml area #610

@ericmorand

Description

@ericmorand

Preconditions (*)

  1. Magento 2.3.5 EE

Steps to reproduce (*)

  1. Create a new page
  2. From the page builder, add a text inside the first available row
  3. Save the page
  4. Head to the newly created page from the front-office

Expected result (*)

  1. The HTML markup is free from "data-" attributes that are not needed to theme the website.

Actual result (*)

  1. The HTML markup is populed by "data-" attributes that are needed for the back-office to function properly: data-element, data-appearance and data-content-type.

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions