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

Link to document within html renders wrong url on site

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.04.07, 2.05.02, 2.10.02
    • 2.04.08, 2.05.03, 2.20.00RC1
    • None
    • None

    Description

      When I add a link to a document within the html content of a document, it renders the url not in a way I expected. It should render the url with a .html extension similar to the way that is shown when rendering the urls from links in hst:sitemenus.
      I tried to find out if the problem was originating from our own content rewriter, but during debugging (and using the SimpleContentRewriter) I found a problem in class org.hippoecm.hst.core.linking.DefaultHstLinkCreator. I used the following setup:
      I put a link <a href="testevent"> in document within a document located at /content/documents/NS/test/over-testen/sub2/demo-artikel/demo-artikel.
      When I follow the debugger in DefaultHstLinkCreator I get to line 356 where nodePath is set to /content/documents/NS/test/over-testen/sub2/demo-artikel/demo-artikel/nscommon:summary/testevent (where nscommon:summary is the content field). After dereffing the node it is decided on line 365 that this node is not of type NT_DOCUMENT ("hippo:document", I'm guessing that the deref method has returned a hippo:handle instead of the hippo:document?? ) resulting in not setting the representsDocument instance var to true. As a consequence the resolver resolves the link as a link to... I really don't know. Finally the resolver resolves the link to
      url /content/documents/NS/test/over-testen/sub1/testevent, which in itself is correct, but it should be /content/documents/NS/test/over-testen/sub1/testevent.html, because the sitemap is configured to use a different template for these specific matchers (* and *.html)
      IMHO the link should be dereffed one level deeper to point to the correct node.

      Attachments

        Activity

          People

            aschrijvers Ard Schrijvers
            pvanderz Paul van der Zandt (Deprecated)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: