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

Studio "view" mode listening on "message" event also used by 3rd party => js error

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • 1.8.1, 1.7.3
    • 1.7.0
    • Studio UI
    • None

    Description

      When upgrading ez platform/studio from 1.5 to 1.7 everything worked fine with platform, but in studio ui, we ran into js errors happening on "view" mode (under "Page") for any content type.

      Yesterday I raised this in slack and Dariusz Szut helped me a bit to debug. Thank you very much Dariusz again!

      What we found out is that the "MultiDomainBrowserView" of studio ui is working on "message" event which seems to be used e.g. by doubleclick (banner provider) and probably other 3rd party libraries as well. Our frontend templates are integrating doubleclick and as the event handling expects to have access to event._event.data.pathName on all these events, which is only present in ez relevant events of course. As this property is not present in our case now, js errors happen and "view" mode is not usable at all as indicator graphic is never disappearing.

      Would be great if events could be guarded with some checks to guarantee studio ui working even if frontend application works with custom or 3rd party js libraries.

      Relevant code for this use case (but there might be other similar cases as well?):
      vendor/ezsystems/studio-ui-bundle/Resources/public/js/views/ezs-multidomainbrowserview.js

      • initializer(): binding this._postMassageHandler on 'message'
      • _eventHandlerLoad(): here the error happens when trying to access iframePath.indexOf(...), as iframePath is undefined

      PS: when selecting the affected version for this issue, version 1.7 was still listed under "Unreleased versions"?

      Attachments

        Activity

          People

            Unassigned Unassigned
            andesk andesk
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: