Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-2286

Backport to 7.7: Regression: ComponentRepresentation includes context path in iconURL for mount without a context path

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • High
    • Resolution: Fixed
    • 2.24.07, 2.25.05
    • 2.24.08
    • Template Composer
    • None

    Description

      When the CMS and site are run on different hosts without the /site context path, the ComponentRepresentation of the page composer REST service still creates icon URLs that start with /site. The net effect is that all icons in the component toolbar of the channel manager are broken (see CMS7-6449).

      Steps to reproduce:
      1. In Chrome, log in to http://cms.demo.test.onehippo.com/
      2. open the Network tab in Chrome dev tools and filter on XHR calls
      3. navigate to the English Channel in the Channel Manager
      4. in the dev tools, locate the call to /.toolkit
      5. inspect the output, which looks like:

      {
      success: true,
      message: "Toolkit items loaded successfully",
      data: [
      {
      id: "6e0aa68c-1256-4549-b7d9-23501d82d7d9",
      name: "latestcomments",
      path: "/hst:hst/hst:configurations/common/hst:catalog/gogreen-catalog-items/latestcomments",
      label: "Latest Comments",
      iconPath: "images/catalog/icon-latest-comments.png",
      iconURL: "http://www.demo.test.onehippo.com/site/images/catalog/icon-latest-comments.png",
      parentId: null,
      componentClassName: "com.onehippo.gogreen.components.common.LatestItems",
      template: null,
      type: "CONTAINER_ITEM_COMPONENT",
      xtype: "HST.Item"
      },
      <snip>

      Expected: the iconURLs start with "http://www.demo.test.onehippo.com/images/catalog ..."
      Actual: the iconURLs start with "http://www.demo.test.onehippo.com/site/images/catalog ..."

      Somehow the call in ComponentRepresentation to create the iconUrl now includes the context path, even though /hst:hst/hst:hosts/test-env/com/hst:showcontextpath = false.

      This is also reproducible locally by running using httpd and running the site and CMS behind different hosts, without a context path (e.g. www.example.com for the site, and cms.example.com for the CMS).

      This iconURLs in the 7.7 branch do not include /site and work fine, so this is a regression.

      Attachments

        Issue Links

          Activity

            People

              svoortman Simon Voortman (Inactive)
              mdenburger Mathijs den Burger (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: