Implementation of optional areas (MAGNOLIA-4265)

[MAGNOLIA-4288] Optional Area with subareas triggers a NullPointerException Created: 04/Nov/11  Updated: 23/Jun/14  Resolved: 22/Dec/11

Status: Closed
Project: Magnolia
Component/s: templating
Affects Version/s: None
Fix Version/s: 4.5

Type: Sub-task Priority: Major
Reporter: Samuel Schmitt Assignee: Federico Grilli
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:

 Description   

When you set as "optional" an area containing subareas it triggers a NullPointerException.

This error is triggered because even if the area is optional, the template script is evaluated.
In the template script you can find call to the subareas [@cms.area name="TheSubArea"/] and as the parent area is optional, no content is created, then this call trigger a nullpointerException.

A solution could be to not evaluate a script of an optional Area, like when you disable an area. But the difference is that the edit bar has to be created.


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