adobe / adobe/aem-project-archetype
XF Template referencing invalid policy
- Dominant language
- JavaScript
- Stars
- 596
- Forks
- 431
- Avg merge
- 10d 6h
- Merged PRs (30d)
- 1
Description
The generated `xf-web-varation` template has an OOTB policy reference of `cq:policy="/components/page/policy"`. This is not considered a valid "selection" option by AEM's template editor, as policies for `/components/xfpage` must be stored under a policy subpath of that same type (`/components/xfpage`).
To see this in action
- Create a default project from archetype
- Go to Template editor
- Select the "Web Variation" XF template
- Go to edit "Page Policy"
- Notice that the editor shows "New Policy" b/c it is unable to choose the linked policy
- To save, you must name a new policy, at which point the policy will be created in the correct location
The impact of this appears to mostly just be confusion, as the "invalid" policy link still appears to work. However, having this invalid link does open up the possibility of a customer scenario where at first changes (e.g. new clientlibs) added to the standard page policy meant for pages automatically updates Experience Fragments as well, but then after someone makes an update to the Experience Fragment page policy (triggering a new, separate policy to be created) changes to the standard page policy no longer impact Experience Fragments.
Contributor guide
Research direction
Search the generated xf-web-varation template for the cq:policy reference, then reproduce the issue in AEM's Template editor using a default archetype project. Confirm that the Web Variation page policy appears as a selectable existing policy and that the generated reference points to the expected Experience Fragment policy location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, javascript
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100