- 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.