Uploaded image for project: 'Hippo Site Toolkit 2'
  1. Hippo Site Toolkit 2
  2. HSTTWO-2874

Forward port: Namespaces always in componentRenderingURL parameters

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: On Hold
    • Affects Version/s: 2.26.09
    • Fix Version/s: 2.28.08
    • Component/s: None
    • Labels:
      None
    • Similar issues:

      Description

      I found out that with HST version 2.26.09 it is impossible to render correct links with parameters using hst:componentRenderingURL tag when parameter.namespace.ignored is set to true. The links always contains namespace prefixed parameter names and because of that server side component code can no longer get their values.

      Simply speaking, what I need for component to work is:
      /_hn:component-rendering%7Cr34_r1_r1/news?query=hippo
      What I get is:
      /_hn:component-rendering%7Cr34_r1_r1/news?r34_r1_r1:query=hippo

      It is caused by method
      org.hippoecm.hst.core.component.HstURLFactoryImpl#createURL(java.lang.String, java.lang.String, org.hippoecm.hst.core.container.HstContainerURL, org.hippoecm.hst.core.request.HstRequestContext, java.lang.String)
      that executes the following check

      if (referenceNamespaceIgnored && HstURL.RENDER_TYPE.equals(type))

      { referenceNamespace = ""; }

      In case of hst:componentRenderingURL tag the value of type is set to HstURL.COMPONENT_RENDERING_TYPE and prefix is always added.

      We can get the parameter values by adding the prefix in component code. Yet, when we accessed the page with parameter:
      /site/news?query=hippo
      The hst:componentRenderingURL will create the following URL:
      /site%7Cr34_r1_r1/news?query=hippo&r34_r1_r1:query=hippo

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                aschrijvers Ard Schrijvers
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: