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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.21
    • 1.18
    • Plugin
    • None

    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

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

            Dates

              Created:
              Updated:
              Resolved: