Details
-
Bug
-
Resolution: Fixed
-
Major
-
3.1
-
Unknown
-
N/A
-
N/A
-
Description
I had this issue on a multiwiki environment but I reproduced it in a single wiki environment as well. To reproduce:
1/ create a jsx extension with include="always on this wiki", say MySpace.MyJSX
2/ create a page in the wiki where you use the extension manually with
$xwiki.jsx.use('wikiname:MySpace.MyJSX')
When visualizing the page (and page source), you'll see that the element
<script type='text/javascript' src='/xwiki/wiki/wikiname/jsx/MySpace/MyJSX' defer='defer'></script>
actually appears twice.
This is caused because the deduplication on the ssx plugin side is done based on document fullname and while for the always used extensions this is MySpace.MyJSX, the manual one was containing a wiki name as well.
Also note that if the full prefixed document reference is invalid (points to an inexistent wiki) – for example in single wiki mode – the manual include still works, generating a correct link to the current wiki, and the deduplication still doesn't work.
Deduplication could also be done based on resources urls rather than names.
Attachments
Issue Links
- relates to
-
XWIKI-11715 JSX (SSX too?) gets executed twice if set to "On this page or on demand" and included manually
- Closed