Reference Provider: Return only cq:Page nodes, handle collection items correctly

Description

the reference provider introduced in needs some improvements:

  • it should not return just any resource as reference, but only AEM pages. if it returns only a resource this may create problems, does not work correctly when deleting this.
    finding only a resource may happen if:

    • the AEM page persistence strategy is not active

    • a configuration collection is used (this should be fixed with )

    • "legacy" configuration content exists that was not stored with the AEM page persistence strategy

  • in case of configuration collection it should not only return the root page (once this is a page, see ), but also the child pages (=collection items)
    for the collection items the item name should be added to the reference name

  • if only a resource is found we should try to get a containing page

    • different persistence strategies may may use different scopes for defining the page

    • if we found a containing page we return this as reference

    • but only if it's not the same page that was activated initially (this may happen if the tools config page persistence strategy is used)

  • we need unit tests for these different scenarios

Status

Assignee

Unassigned

Reporter

Stefan Seifert

Labels

None

Components

Affects versions

Priority

Major
Configure