[PAGES-1232] Component inheritance fails on REST requests for pages below certain depth Created: 15/Jun/23  Updated: 16/Jun/23

Status: Open
Project: Magnolia pages module
Component/s: None
Affects Version/s: 6.2.28
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Roberto Gaona Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Attachments: Zip Archive testLM-1.zip     File website.123.yaml    
Issue Links:
Problem/Incident
Sub-Tasks:
Key
Summary
Type
Status
Assignee
PAGES-1233 Implementation Sub-task Closed  
PAGES-1234 Review Sub-task Closed  
PAGES-1235 Pre-Integration QA Sub-task Closed  
PAGES-1236 QA Sub-task 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
Epic Link: AuthorX Support
Team: AuthorX

 Description   

Steps to reproduce

  1. Create a pages structure using the attached page templates to enable inheritance. This structure has to contain pages on multiple depth levels (On this case, there are 5 levels of depth. (Pages import example is attached as well)
  2. Create a REST endpoint which makes use of the new jcrPagesDeliveryEndpoint_v2 and sets a depth other than 0 or -1.
  3. Request through this endpoint pages from the created structure.

Expected results

Since all pages should inherit components from the root node, the _inherited node should appear on all requests.

Actual results

As soon as the page depth surpasses the inherited component depth level, inheritance won't work since it will skip those components.

Workaround

Development notes

Client suggests the issue is located on FilteringContentDecoratorBuilder :

if (depth >= 0) {
            ChildFilteringContentDecorator depthDecorator = new ChildFilteringContentDecorator(new DepthFilteringPredicate(getDepth(node), getDepth(node) + depth), true);
            node = new ContentDecoratorNodeWrapper<>(node, depthDecorator);
        } 

Which would make sense, since it sets the minimum depth to the node being queried, skipping all the nodes that should be inherited from a lower depth.


Generated at Mon Feb 12 06:26:20 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.