[MAGNOLIA-3361] versioning: ContenVerstion.getContent(), hasContent() and getChildren() are not all working as they should Created: 03/Nov/10  Updated: 18/Mar/13  Resolved: 03/Nov/10

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 4.3.8
Fix Version/s: 4.3.9, 4.4

Type: Bug Priority: Critical
Reporter: Philipp Bärfuss Assignee: Philipp Bärfuss
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
is causing MGNLSTK-697 version view: the home pages doesn't ... Closed
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   

getContent(), hasContent() and the getChildren() variations are not following the same principles. They should return direct children if they were included in the version rule and children of the current node if they are no matched by the version rule.

The idea of VersionContent is supposed to hide the fact that it resides in the version store.

Example: A page version includes all sub paragraphs but not the sub pages. If you read a paragraph it should only return direct children, if you read sub pages it should only use the current node.

The actual situation is:

  • getContent() and hasContent() only return direct Children
  • getChildren() works as expected but the method getChildren(filter, pattern, comp) is not implemented so as soon the node gets wrapped the getChildren() methods return different entries.

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