Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-20112

Custom headers are not registered when loaded to soon

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A
    • Pull Request accepted

    Description

      When some content is loaded asynchronous, the required skin extensions are injected separately using the X-XWIKI-HTML-HEAD custom response header. The problem is that the code that does this is defined inside a jQuery code block, meaning that requests that are done before this code is loaded (e.g. from a Prototype code block, which is loaded before) will not have the required skin extensions injected.

      To reproduce:

      Right now, doextra.vm duplicates skin extensions import. For example for the attachments tab, these are done from docextra.vm and also from attachmentsinline.vm, while they should be added only when the attachments tab is actually loaded (i.e. attachmentsinline.vm), to not load resources that may not be needed.
      After deleting the imports from doextra.vm, we cannot see the attachments after refreshing the page while being on the attachments tab

      Attachments

        Issue Links

          Activity

            People

              oana.florean@xwiki.com Florean Oana-Lavinia
              oana.florean@xwiki.com Florean Oana-Lavinia
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: