[MGNLSTK-951] Disabling ExtrasArea without need to define class property: BodyClassResolver should first check if enabled, then cast. Created: 15/May/12  Updated: 06/Jun/12  Resolved: 15/May/12

Status: Closed
Project: Magnolia Standard Templating Kit (closed)
Component/s: base system, themepop
Affects Version/s: 2.0, 2.0.1, 2.0.2
Fix Version/s: 2.0.3

Type: Improvement Priority: Major
Reporter: Christian Ringele Assignee: Ondrej Chytil
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File BodyClassResolver.txt    
Issue Links:
supersession
supersedes MGNLSTK-942 stkNews template renders Freemarker e... Closed
Template:
Patch included:
Yes
Acceptance criteria:
Empty
Date of First Response:

 Description   

Disabling the extras area is the most common use case on templates, besides reconfigure it.
When disabling the extras area by adding the property enabled=false, a class cast exception happens in the BodyClassResolver.
Without the definition of the specific bean by the class property, the code does not work.
But it is really really hard for people to find out why they get the freemarker error without the class property, and then to find out what class to use.

The new code uses first a default AreaDefintion for checking the .isEnabled() value, and then casts within the if.



 Comments   
Comment by Christian Ringele [ 15/May/12 ]

Would be nice if this could be applied ASAP.
Thnx

Comment by Ondrej Chytil [ 15/May/12 ]

Commit.

Generated at Mon Feb 12 07:31:57 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.