Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-12105

Fix query string processing in SPA SDK

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Done
    • 13.3.0, 13.4.0
    • 13.4.0
    • None
    • None
    • Tiger
    • Tiger Sprint 214, Tiger Sprint 215

    Description

      The issue mostly affects Angular SDK but also takes place in the React SDK. When we are using URL rewriter without trailing slash redirect, the preview URL will be like `/site/_cmsinternal/spa-ssr?render_host=localhost`. In this case, the SDK sends Page Model API request to `http://localhost/site/_cmsinternal/spa-ssr/resourceapi/spa-ssr?render_host=localhost` which returns 404. The problem is, both of our SDKs incorrectly detect path because of the query string.

      Way to reproduce:
      1) Run the HAP with SSR SPA.
      2) Go to http://localhost:3000/site/spa-ssr?something

      Actual:
      The browser shows 404.

      Expected:
      The browser shows the home page. The query string (`?something`) shouldn't give a difference.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mdokolin Mikhail Dokolin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: