Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
6.2-milestone-2
-
Unknown
-
Description
For example I've noticed that the following resources are pulled with forceSkinAction set to true:
- In macros.vm
#set ($url = $xwiki.getSkinFile('icons/xwiki/noavatar.png', true))
- In Main.Activity lots of resources are pulled using the following (this leads for ex to icons/silk/page_white_add.png being loaded not as a static resource but through the skins action)
$xwiki.getSkinFile($activityActionsMap.get($eventType), true)
- In javascript.vm there are quite a lot of JS files pulled with forceSkinAction (and this is dangerous since velocity is applied!). For example:
$xwiki.jsfx.use('js/scriptaculous/effects.js', true)##
Note that one easy way to find out the full list is to put a conditional breakpoint in api/XWiki.java in the method "public String getSkinFile(String filename, String skin, boolean forceSkinAction, XWikiContext context)" on the following line:
url = urlf.createResourceURL(filename, forceSkinAction, context);
(put as condition for the breakpoint that forceSkinAction is true, and filename ends with "png", "js", etc)