Uploaded image for project: 'Cristal Integration'
  1. Cristal Integration
  2. CRISTALINT-34

Cristal Integration fails when XWiki is deployed at the root context

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 1.8.0
    • Cristal Skin
    • 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:

      Source code

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            enrique Enrique
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: