Uploaded image for project: '{RETIRED} XWiki Skin Extensions'
  1. {RETIRED} XWiki Skin Extensions
  2. XSKINX-42

Deleting an SSX objects from a document prevents skin objects to be used on demand in that document

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.18
    • Fix Version/s: 1.21
    • Component/s: Plugin
    • Labels:
      None
    • Similar issues:

      Description

      To reproduce:

      • create an SSX object in a document, say X.Y
      • delete this object, create a second one. Add some rules in this second object
      • in the document content, add a script to use the ssx in X.Y ($xwiki.ssx.use("X.Y"))
      • save and view: the rules in the second object will not be applied, analysing the document source will reveal that the link to the css generated by the ssx action on X.Y does not even exist.

      The issue is caused by the fact that:
      com.xpn.xwiki.plugin.skinx.AbstractDocumentSkinExtensionPlugin#hasPageExtensions(XWikiContext context) gets all objects with XWikiDocuments#getObjects and doesn't check them for null (there are null positions in this array for deleted objects). Then, this throws NPE in the middle of getImportString(XWikiContext context) which in turn fails to generate correctly the links to scripts included with .use.

        Attachments

          Activity

            People

            • Assignee:
              sdumitriu Sergiu Dumitriu
              Reporter:
              lucaa Anca Luca
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: