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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Skin - Skinx
    • Labels:
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: