Open tim-merrillcorp opened 5 years ago
@tim-merrillcorp, thanks for your report, I moved the second issue to #427.
As the results are provided on the fly, it seems like they're not run through the default link rewriter and therefore require handling to ensure they are mapped correctly.
This should be fixed by #713.
As #713 might take some time, why not simply calling RR.map(...)
on the JSON value in the mean time? Would you accept a PR for that?
The least changes would mean adjusting https://github.com/adobe/aem-core-wcm-components/blob/345377e9701a6724abc8ddf5a1fc5c3ade85f406/bundles/core/src/main/java/com/adobe/cq/wcm/core/components/internal/Utils.java#L61 but it is hard to estimate the side-effects!
@vladbailescu WDYT about a fix which would just call RR.map on https://github.com/adobe/aem-core-wcm-components/blob/345377e9701a6724abc8ddf5a1fc5c3ade85f406/bundles/core/src/main/java/com/adobe/cq/wcm/core/components/internal/Utils.java#L61?
@kwin, it would require some testcases to make sure it does not break stuff, but could be a solution. We would appreciate some help here, especially with the testcases.
As I can see the issue is still reproducible on the core component version 2.17.10. Can be also seen in the https://wknd.site/us/en.html site (search for "magazine") which uses the 2.16.4 core components version.
The results in SearchResultServlet are getting wrapped in PageListItemImpl which is calling LinkManager to build a Link. The LinkImpl created in LinkBuilderImpl sets the url field to the sanitized "URL", which just is the sanitized path. This gets exposed via LinkImpl#getURL to the PageListItemImpl#getURL and clearly is not a URL
We have created mapping under /etc/map to remove the /content/mywebsite text from the url across the site. However, there doesn't appear to be a way to remove the /content/mywebsite text from the search results.
We are on AEM 6.4, service package 6.4.2. Core Components version 2.0.4.