Index: src/main/java/com/xpn/xwiki/plugin/skinx/AbstractDocumentSkinExtensionPlugin.java =================================================================== --- src/main/java/com/xpn/xwiki/plugin/skinx/AbstractDocumentSkinExtensionPlugin.java (revision 27525) +++ src/main/java/com/xpn/xwiki/plugin/skinx/AbstractDocumentSkinExtensionPlugin.java (working copy) @@ -22,6 +22,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Set; import java.util.Collection; @@ -149,10 +150,11 @@ // Otherwise, we look them up in the database. Set extensions = new HashSet(); String query = - ", BaseObject as obj, StringProperty as use where obj.className='" + getExtensionClassName() + "'" + "select doc.fullName from XWikiDocument doc, BaseObject as obj, StringProperty as use where obj.className='" + getExtensionClassName() + "'" + " and obj.name=doc.fullName and use.id.id=obj.id and use.id.name='use' and use.value='always'"; try { - for (String extension : context.getWiki().getStore().searchDocumentsNames(query, context)) { + List extdocs = context.getWiki().getStore().search(query, 0, 0, context); + for (String extension : extdocs) { try { XWikiDocument doc = context.getWiki().getDocument(extension, context); // Only add the extension as being "always used" if the page holding it has been saved with