Expand my Community achievements bar.

Allowed components for a parsys do not apply when the parsys is loaded from absolute path

Avatar

Level 4

I've recently built a new tool for managing a certain type of system-wide configuration; we'll call it the Sandwich Types Config Tool.  This tool resides under the Tools section (/etc).

The initial implementation stored the configuration under the tool itself (the tool is an instance of a "sandwichTypesTool" page component, which includes a "sandwichTypesConfig" parsys for adding Sandwich Type components to).  In an effort to decouple the tool and the configuration, I chose to move the "sandwichTypesConfig" node to a different location, /etc/persistent-config/sandwichTypesConfig.  When I moved this node, I updated the "sandwichTypesTool" page component to use an absolute path to include the "sandwichTypesConfig" node from its new location.

<%@include file="/libs/foundation/global.jsp" %> <div id="content"> <%-- before --%> <%-- <cq:include path="sandwichTypesConfig" resourceType="foundation/components/parsys"/> --%> <%-- after --%> <cq:include path="/etc/persistent-storage/sandwichTypesConfig" resourceType="foundation/components/parsys"/> </div>

This mostly works as intended.  The peculiar thing, however, is that the parsys is no longer loading its allowed components from the design.  The strange part is that I can enter design mode and select the allowed child components for the parsys, and this setting is persisted on the design.  AEM fails to load that setting back from the design.

Has anybody experienced this?  Is there a known workaround?  Any other thoughts or ideas?

2 Replies

Avatar

Level 10

I have not seen this use case before - however - this may be a unreported bug. 

Avatar

Level 4

As an aside, this isn't a major impediment.  By taking a slightly different approach, I am able to work around this by adding a dialog to the "sandwichTypesConfig" component (which is actually an extension of parsys, not a foundation/components/parsys).  The dialog allows me to add children to the parsys, without the sidekick recognizing the children as allowed.

I am still seeking input from others, however.  Please weigh in with your thoughts on the original question.