Uploaded image for project: 'Magnolia pages module'
  1. Magnolia pages module
  2. PAGES-1232

Component inheritance fails on REST requests for pages below certain depth

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Neutral
    • None
    • 6.2.28
    • None
    • None

    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.

      Checklists

        Acceptance criteria

        Attachments

          1.
          Implementation Sub-task Closed Unassigned
          2.
          Review Sub-task Closed Unassigned
          3.
          Pre-Integration QA Sub-task Closed Unassigned
          4.
          QA Sub-task Closed Unassigned

          Activity

            People

              Unassigned Unassigned
              rgaona Roberto Gaona
              AuthorX
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Checklists

                  Bug DoR
                  Task DoD