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

Unable to use Skin extension when the skin is in a different wiki

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • None
    • Skin - Skinx
    • N/A
    • N/A

    Description

      On a XEM environment where the skin is in a different wiki than the current wiki, the skin extension's properties that point to css files cannot be used.
      $xwiki.getSkinFile() returns an invalid url when in an XEM environment where the skin document is in a different wiki than the current wiki.

      The code behind the function from XWiki.java

      public String getSkinFile(String filename, String skin, boolean forceSkinAction, XWikiContext context)
      

      is that it assumes that the skin resides in the current wiki.

      BaseObject object = doc.getXObject(new DocumentReference(context.getDatabase(), "XWiki", "XWikiSkins"));
      

      This should be changed to

      BaseObject object = doc.getXObject(new DocumentReference(doc.getDocumentReference().getWikiReference().getName(), "XWiki", "XWikiSkins"));
      

      so that the class reference point to the wiki where the skin is.

      Attachments

        Issue Links

          Activity

            People

              softec Denis Gervalle
              flavius.olaru Flavius Olaru
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: