Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
Description
The method HstLinkResolver.resolveAllCanonicals() logs a warning when no canonical links can be created. However, returning an empty list is a valid state and should not cause a warning.
For example, the documents 'comments' and 'reviews' in GoGreen do not have a dedicated sitemap item. When such a document is viewed in the CMS, the 'View' menu performs a REST call to get the canonical links for all channels. That call uses HstLinkResolver.resolveAllCanonicals(), which then logs a warning. As a result, a warning is logged whenever a 'comment' document is viewed in the CMS.
Steps to reproduce:
1. log in to the GoGreen CMS
2. open a comment document in the folder 'Hippo Go Green -> Comments -> News -> solar-power-the-skys-the-limit'
Expected behavior: no warning is logged
Actual behavior: the following warning is logged:
WARN [org.hippoecm.hst.core.linking.DefaultHstLinkCreator$HstLinkResolver.resolveAllCanonicals():662] Cannot create a link for node with path '/content/documents/hippogogreen/comments/news/solar-power-the-skys-the-limit/Comment on solar-power-the-skys-the-limit 2010-07-30 12.53.10.447'. Return empty list for canonicalLinks.