Details
Description
Problem:
Value of "data-xwiki-rest-url" data attribute starts with "//"
data-xwiki-rest-url="//xwiki/rest/wikis/xwiki/spaces/Main/pages/WebHome"
Consequences:
Functionalities using xm.restURL or $services.rest.url are not working. Most apparent on annotations(if enabled) - as they are fetched via rest api on every page. See https://forum.xwiki.org/t/problem-when-fetching-annotations-after-switching-to-pathbased-false/7886
How to replicate:
XWIKI version 12.9 - .deb installed on Ubuntu 20+ (tomcat9 + nginx) on www.yourdomain.com
xwiki.properties
- url.standard.multiwiki.isPathBased=false
xwiki.cfg
- xwiki.virtual.usepath=0
- xwiki.home=http://www.yourdomain.com/
1 other subwiki active on different domain (not sure if this is relevant)
As long as xwiki.home value contains trailing "/" then value of "data-xwiki-rest-url" attribute on html tag starts with "//". When trailing "/" is removed from xwiki.home then "data-wiki-rest-url" contains correct values.
Note that in xwiki.cfg in the comment section it is explicitly recommended to use trailing /.
Attachments
Issue Links
- is related to
-
XWIKI-12360 REST Script Service generates invalid URL when XWiki is deployed as ROOT
- Closed