-
Bug
-
Resolution: Fixed
-
Major
-
5.0, 5.1
It is possible to add multiple components to an area of type=single, which will result in an exception in the ftl(not anymore, this was fixed).
However, if one tries to add a new component to a area of type=single (mainly templates with auto-generated content), an error is thrown:
ERROR fo.magnolia.pages.app.action.CreateComponentAction: Exception caught: No template definition registered for id: info.magnolia.registry.RegistrationException: No template definition registered for id: at info.magnolia.rendering.template.registry.TemplateDefinitionRegistry.getTemplateDefinition(TemplateDefinitionRegistry.java:73) at info.magnolia.pages.app.action.CreateComponentAction.buildNewComponentDialog(CreateComponentAction.java:192)
- area type=single doesn't show the correct available actions in actionbar, e.g.
- Sitemap
- "Add Components" should be deactivated
- "Move Component" should be deactivated
- Sitemap
- Optional area (mostly sub-area of components, e.g. stkLinkList) can't be deleted after creation.
Once an area has been added with "Add component" in the action bar rendering fails because of the unexpected presence of a second component in the 'single' area.
Caused by: javax.servlet.ServletException: javax.servlet.jsp.JspException: info.magnolia.rendering.engine.RenderException: Can't render area node /qwe/main with name main at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:861) at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:794) at org.apache.jsp.templates.blossomSampleModule.pages.main_jsp._jspService(main_jsp.java:144) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388) ... 127 more Caused by: info.magnolia.rendering.engine.RenderException: Can't render area node /qwe/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 /qwe/main]: expected one component node but found more. at info.magnolia.templating.elements.AreaElement.end(AreaElement.java:303) ... 133 more
Acceptance criteria
- is duplicated by
-
BLOSSOM-148 Area defined as Single Type allows to add more than one component
- Closed
- is related to
-
MAGNOLIA-5418 Rendering should not fail on single area when more than one component exists in repository
- Closed
-
PAGES-62 Disable duplicate action in 'single' areas and when 'maxComponents' is reached
- Closed
- relates to
-
MGNLUI-2931 Add Component action availability
- Closed