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

getSkinFile doesn't return the proper URL to a ressource customized with XWikiSkinFileOverrideClass

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 7.4.3, 11.10.5, 12.6.5, 14.10.2
    • Flamingo Skin, Old Core, Skin
    • None
    • Unknown

    Description

      How to reproduce

      • in the XWiki.DefaultSkin, configured as the skin of the wiki
      • add a new overridden template, for example print.css but works also for something like layoutExtraVars.vm
      • get the URL of that resource, using the xwiki.getSkinFile() mechanism, for example using the following code:
        {{velocity}}
        $xwiki.getSkinFile('print.css', true)
        $xwiki.getSkinFile('layoutExtraVars.vm', true)
        {{/velocity}}
        

      Expected result:

      /xwiki/bin/skin/XWiki/DefaultSkin/print.css
      /xwiki/bin/skin/XWiki/DefaultSkin/layoutExtraVars.vm
      

      Actual result:

      /xwiki/bin/skin/XWiki/DefaultSkin/content?cache-version=17.1
      /xwiki/bin/skin/XWiki/DefaultSkin/content?cache-version=17.1
      

      The URL of the actual result displays a "page not found" screen, doesn't return any content.

      Note: for regular vms, even if the URL is broken the overwrite is actually taken into account.
      However, for the overwrite of a css like print.css since the functioning of the overwrite is based on the URL to the CSS being correctly generated towards the skin file, it doesn't work.

      Note: I did the test on a subwiki, not sure if it's relevant or not, but just in case.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lucaa Anca Luca
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: