Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-5418

Rendering should not fail on single area when more than one component exists in repository

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Neutral
    • 5.2.5
    • None
    • rendering

    Description

      If you change the type of an area to single and there are more than one component already present in an area rendering fails with an exception.

      Consider the case where the templater is designing his templates and experimenting and changes the type

      Or the case where the template is changed on an existing node, then we don't empty the page of things that should not be rendered. Areas that are no longer referenced in the template script won't appear even though they're still there in the content. Conversely we should be more graceful about the fact that there can be more components in there and just not render them.

      Caused by: info.magnolia.rendering.engine.RenderException: Can't render area node /home/about/main with name main
      	at info.magnolia.templating.elements.AreaElement.end(AreaElement.java:345)
      	at info.magnolia.templating.jsp.cms.AbstractTag.doTag(AbstractTag.java:102)
      	at org.apache.jsp.templates.blossomSampleModule.pages.main_jsp._jspx_meth_cms_005farea_005f0(main_jsp.java:218)
      	at org.apache.jsp.templates.blossomSampleModule.pages.main_jsp._jspService(main_jsp.java:124)
      	... 130 more
      Caused by: info.magnolia.rendering.engine.RenderException: Can't render single area [node /home/about/main]: expected one component node but found more.
      	at info.magnolia.templating.elements.AreaElement.end(AreaElement.java:303)
      	... 133 more
      

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                rkovarik Roman Kovařík
                tmattsson Tobias Mattsson
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD