Details
-
Bug
-
Status: Open
-
High
-
Resolution: Unresolved
-
15.5.0
-
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.