I have an XWiki instance with several sub-wikis and I would like to share CSS from the main wiki across all the sub-wikis, and some images from one of the sub-wikis with all the other subwikis. All rights are default - no changes have been made and all wikis are publicly visible (on our intranet). When not logged in, everything works as expected. However, when a local user logs into one of the sub-wikis, the CSS and images no longer load.
Here is my setup:
- I have a StyleSheetExtension object attached to a page on the main wiki set to “On demand only” with the CSS I want to use on the main wiki and all sub-wikis.
- To share the CSS with all subwikis, I have a UIExtensionClass object with the Extension Point ID “org.xwiki.platform.html.head” attached to a page on the main wiki set to “Global”. In it, I have the following velocity script:
{{velocity}}
{{html clean="false"}} ## We need clean="false" because we want the unmodified raw content
<link href="/xwiki/bin/ssx/assets/css/global" type="text/css" rel="stylesheet">
{{/html}}
{{/velocity}}
- The images are attached to a page in one of the sub-wikis (to be used as a “graphics library” for all wikis).
With this setup, if a user is NOT logged in, they can view any page on the main wiki or any sub-wiki and the CSS and images work as expected. If a local user logs into their sub-wiki, the CSS no longer works and the images don’t load.
Why would the logged in user have more restrictive rights to the content from other wikis than someone who is not logged in? Is there a way to fix this?