[MAGNOLIA-5884] Extending node does not inherit things that the extended node inherits from its ancestors Created: 14/Aug/14  Updated: 19/May/22  Resolved: 19/May/22

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

Type: Bug Priority: Neutral
Reporter: Cheng Hu Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

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
Date of First Response:

 Description   

This is an esoteric case where extends does not work correctly. To see the effect, do the following:

1. Lets call dialog /modules/standard-templating-kit/dialogs/pages/home/stkHomeProperties n1
2. Duplicate it twice into n2 and n3
3. Delete everything under n2.form and make n2.form extend n1.form
4. Add an empty content node n2.form.tabs
5. Delete everything under n3.form.tabs
6. Make n3.form.tabs extend n2.form.tabs
7. Use n3 in place of n1 in /modules/standard-templating-kit/templates/pages/stkHome@dialog
8. Open the demo-project page in Page Editor and edit properties, see that the dialog does not display correctly

Theoretically, it should display correctly because n2.form extends n1.form, so n2.form.tabs contains everything in n1.form.tabs. Since n3.form.tabs extends n2.form.tabs, it should have everything in n1.form.tabs. Thus n3 should be the same as n1.

This is a problem that was first noticed in ExtendingNodeWrapper code. Basically, if A extends B, A considers everything that B extends, but not what B might have inherited as a result of one of its ancestors extending something else.



 Comments   
Comment by Jan Haderka [ 15/Aug/14 ]

Is that really an issue? This is what I would expect. Inheritance is within hierarchy, computed while rendering page while extensions are traversing the tree allowing to make "soft" copy of node and modify it. IMHO the two concepts should not be mixed together or it would often lead to unpredictable results.

Comment by Roman Kovařík [ 19/May/22 ]

Hello,

This ticket is now marked as closed due to one of the following reasons:

  • A long period of inactivity
  • Uses an old or Beta version of an application, module, or framework that we no longer support
  • The issue is no longer reproducible or has been fixed in later versions

If you are still facing a problem or consider this issue still relevant, please feel free to re-open the ticket and we will reach out to you.

Thank you,
The Magnolia Team

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