Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
1.8.0
-
None
-
Unknown
-
Description
Cristal Integration currently assumes that XWiki is deployed under the /xwiki context. In version 1.8.0, baseURL is hard-coded to ${window.location.origin}/xwiki:
On an XWiki installation deployed at the root context, the normal URLs are:
/bin/view/Main/
/rest/wikis/xwiki/...
/cristal/
The Cristal UI loads from /cristal/, but subsequent requests are sent to:
/xwiki/rest/...
/xwiki/bin/get/...
/xwiki/bin/login/...
These URLs return HTML error or redirect pages, which causes JSON parsing errors such as:
SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
I reproduced the problem on two installations using XWiki 18.5.0 and Cristal Integration 1.8.0.
The "Switch to Cristal" action also points to /xwiki/cristal/, so it does not work on root-context installations either.
Cristal Integration should derive the servlet context dynamically so that both root-context and /xwiki deployments work.
This is related to CRISTALINT-3, but covers the specific case of XWiki being deployed at the root context.