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

External preview and custom link processors result in faulty URLs

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • High
    • Resolution: Unresolved
    • 15.5.0
    • 15.7.1
    • None
    • Flagged
    • Orion
    • Orion.Cycle.Sprint.Candidate
    • Undetermined

    Description

      In an archetype project, install news from essentials, implement a custom link processor (I have attached one such implementation in the ticket) and enable the external channel preview.

      When you navigate to a news detail page and you either click "Copy preview URL" from the page menu or directly click on the Preview button in the top right corner

      Expected result: http://localhost:8080/site/news/the-medusa-news?preview-token=b6518f89-7f3b-4698-b838-d74eeda387b2

      Actual result: http://localhost:8080/site/news/_any_?preview-token=b6518f89-7f3b-4698-b838-d74eeda387b2

      When the custom link processor rewrites links from news/t/the-medusa-news to /news/the-medusa-news the External preview URL is populated correctly.

      However, when the custom link processor rewrites from news/t/the-medusa-news to /the-medusa-news it is not.

      In both cases, in the class org.hippoecm.hst.pagecomposer.jaxrs.util.HstConfigurationUtils and method #getPagePreviewUrl line 225 the returned String is always http://localhost:8080/site/news/_any_?preview-token=b6518f89-7f3b-4698-b838-d74eeda387b2

      In the page service of the channel manager (community/channel-manager/frontend-ng/src/app/services/page.service.js) there is a method #getPagePreviewUrl that performs some logic of splitting and replacing

      It looks like the logic in that method does not cover such edge cases as the one described above.

      Attachments

        Activity

          People

            orion-team Orion Team
            LKaramoulas Lef Karamoulas
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: