Uploaded image for project: 'eZ Platform Enterprise Edition'
  1. eZ Platform Enterprise Edition
  2. EZEE-2735

Including <!--<head></head>--> to the template will break PageBuilder preview

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • 2.5.0, 2.4.3
    • 2.4.2
    • Page Builder
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mateusz.bieniek@ibexa.co Mateusz Bieniek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: