[MAGNOLIA-5227] Optional area not added on author instance renders on public instance Created: 07/Aug/13  Updated: 30/Aug/13  Resolved: 16/Aug/13

Status: Closed
Project: Magnolia
Component/s: templating
Affects Version/s: 4.5.7, 4.5.10
Fix Version/s: 4.5.11

Type: Bug Priority: Major
Reporter: Kaushal Parikh Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: framework
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Author & Public both on same tomcat


Issue Links:
Cloners
is cloned by MAGNOLIA-5236 Optional area not added on author ins... Closed
causality
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Testcase included:
Yes
Date of First Response:

 Description   

We are having one area that is configured as
optional = true
floating = true
type = list

the area has following structure in templateScript with jsp renderer.

<div class='outer'>
<div class-'inner'>
<c:forEach items="${components}" var="component">
<cms:component content="${component}" />
</c:forEach>
</div>
</div>

we have NOT added that area using '+' button in edit mode, but still it generates following structure in public mode when activated.

<div class='outer'>
<div class-'inner'>
</div>
</div>



 Comments   
Comment by Roman Kovařík [ 07/Aug/13 ]

Hello,
on the documentation is written:

optional Makes the area optional. Adds a delete button in the area toolbar that editors can use to remove the area from the page.

Are you able to delete the area from the page?

Best regards
Roman

Comment by Kaushal Parikh [ 07/Aug/13 ]

Yes, we are able to delete it. After we delete it, it gets converted to '+' button. But the issue here is: Area is visible on the public instance even if we remove it from author & activate it. Even in preview mode at Author instance area generates NO code but at public instance it generates following code of area with 0 components.

ie. <div class='outer'>
<div class-'inner'>
</div>
</div>

Comment by Roman Kovařík [ 07/Aug/13 ]

Hello again,
Thanks for describing your problem. I was able to reproduce this and I can confirm this is really issue. The problem occurs when area has a script, areas without scripts aren't rendered on public instance as expected.
Empty areas (without components) are not rendered at all in Magnolia 4.5.9, Magnolia 4.5.10 made this behaviour configurable.

Roman

Comment by Kaushal Parikh [ 07/Aug/13 ]

1) Can you please tell me the steps for upgrading magnolia 4.5.7 to 4.5.10
2) Which configurable parameter I have to configure? can you please guide me on that.

Comment by Roman Kovařík [ 13/Aug/13 ]

Hello,

1) This should be straightforward, stop your instance, replace Magnolia 4.5.7 libraries with new ones, start your instance and run the installation (update tasks).
2) In Admincentral, add renderEmptyAreas property under the node Configuration:server/rendering/engine and set its value to false.

Hope that helps
Roman

Generated at Mon Feb 12 04:03:10 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.