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

HST tag hst:messagesReplace misbehaves when its body contains the hst:include tag

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 4.2.1
    • Fix Version/s: 5.1.0
    • Component/s: None
    • Similar issues:
    • Flagged:
      Flagged
    • Sprint:
      Turing Sprint 160, Turing Sprint 161 (7/18-8/1), Turing Sprint 162

      Description

      Specifically, the included component is not rendered inline, but before (above) the output of the hst:messagesReplace tag.

      Please see Woonsan's comment below for an explanation, the fix and a temporary workaround:

       

       
      The reason why the <@hst.include /> result is shown above the result of <@hst:messagesReplace /> tag is because the former unnecessarily flushes response output while executing:
      - org.hippoecm.hst.tag.HstIncludeTag.doEndTag() -> org.hippoecm.hst.core.component.HstResponse.flushChildContent(String) -> org.hippoecm.hst.core.component.HstResponseState.flush(Writer) -> ...
       
      Anyway, a fix for this might take a longer time than expected in most cases (because we have to make sure everything works without any problem by a fix).
       
      For your project for now, I would use "var" attribute to fix the problem:
       
      <@hst.include var="bannerContent" ref="banner">
       
      <@hst.messagesReplace ...>
        <div>
          <span>Bla bla bla</span>
          ${bannerContent}
          <span>More bla bla</span>
        </div>
      </hst.messagesReplace>

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mchatzidakis Minos Chatzidakis
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: