Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-7147

[Customizable Dashboard] Viewing dashboard page causes javascript error when served via Varnish

    XMLWordPrintable

Details

    Description

      Steps to reproduce

      1. Create clean install of Ibexa Experience and place it behind Varnish reverse proxy
      2. Go to the default dashboard

      Actual result

      Observe in a browser's console the following javascript error

      Uncaught Error: Instance for this DOM element already exists!
          at Object.setInstance (ibexa-admin-ui-layout-js.js:2:4410743)
          at new e (ibexa-admin-ui-layout-js.js:2:4315578)
          at e.value (date-based-publisher-common-js.js:1:14003)
          at date-based-publisher-common-js.js:1:5996
          at 53326 (date-based-publisher-common-js.js:1:6049)
          at o (runtime.js:1:128)
          at t (date-based-publisher-common-js.js:1:21498)
          at date-based-publisher-common-js.js:1:21559
          at e (runtime.js:1:1042)
          at e (runtime.js:1:1054) 

      Expected result

      The dashboard page view loads without issues and all button are clickable (beware though of IBX-7046 - that's a separate issue.

      Technical background

      It seems that encore's runtime.js is loaded twice via render_esi. Varnish sees it as separate master requests and appends runtime multiple times to the final HTML output.

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              andrew.longosz@ibexa.co Andrew Longosz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: