Details
-
Bug
-
Resolution: Fixed
-
High
-
2.4.2
-
None
Description
PageBuilder injects javascript snippet to the {{}} tag to handle Cross-Origin requests: https://github.com/ezsystems/ezplatform-page-builder/blob/1.2/src/lib/Event/Subscriber/InjectCrossOriginHelperSubscriber.php#L145
If the developers add somewhere in the template string {{}} it will make the snippet to be injected in the wrong place and potentially breaks page/Page Builder.
Steps to reproduce
1. Clean installation of eZ Platform 2.4.2
2. Use {{Map\Hos}}t for matching SiteAccesses:
ezpublish: siteaccess: list: [site, admin] groups: site_group: [site] admin_group: [admin] default_siteaccess: site match: Map\Host: site.localhost: site admin.localhost: admin
3. Set default page layout to:
<!doctype html> <html lang="en"> <head> <title>Hello, world!</title> </head> <body> <div> {% block content %} {% endblock %} </div> <!-- let's break PageBuilder's Preview. <head> </head> --> </body> </html>
4. In the back office open any Landing Page in site SiteAccess inside Page Builder.
Result
Spinner in the middle of the screen is spinning forever.