[MAGNOLIA-4896] CLONE - Area Definitions from pages and prototype are not merged correctly Created: 11/Mar/13  Updated: 27/Mar/13  Resolved: 25/Mar/13

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

Type: Bug Priority: Critical
Reporter: Stefan Baur Assignee: Ondrej Chytil
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
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

 Description   

In my site def template prototype, I define the inheritance of extras1 area.
In my page def, I define the available components of extras1 area.

It turns out that if you define the area extras1 in the page def, it is not merged with the extras1 area from the template prototype.

To reproduce do this:

  1. Open http://demoauthor.magnolia-cms.com/demo-features/content-structure/extras-area/inherit-extras.html (Inheritance works fine)
  2. Go to the stkSection page definition and create an empty extras1 node by adding this subpath to the definition: stkSection/areas/extras/areas/extras1
  3. Reload the url above and see inheritance not working.
  4. rename new newly created node extras1 to extras1_, and all works again.

In the code, this is the place where I found the issue happening:
info.magnolia.templating.elements.AreaElement#isInheritanceEnabled()

This method only gets called during the begin() method of AreaElement and it returns false if the extras1 node is redefined in the page definition.

Thanks for quick help because this prevents our prototype/page def logic from working.

PS: I haven't investigated if this merging problem causes other similar problems, but I imagine this could be the case.

Stefan


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