[
https://issues.apache.org/jira/browse/SLING-11589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17608187#comment-17608187
]
Dirk Rudolph edited comment on SLING-11589 at 9/22/22 11:00 AM:
----------------------------------------------------------------
{quote}standard JCR have any special notion of {{jcr:content}} child nodes
{quote}
The jcr:content child node is an established, builtin concept of jackraabits
nt:file.
[https://github.com/nabils/jackrabbit/blob/master/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/nodetype/builtin_nodetypes.cnd#L60-L62]
But you are right, limiting this to only "jcr:content" may infer application
specific knowledge.
On the other hand implementing this logic is not very well extensible yet.
We could instead (a) define a property on the configuration which sets the sub
path the resourceType should be checked on (defaults to the requested resource
itself), or (a) we provide an extension point where applications can plug in
custom matching logic.
was (Author: diru):
{quote}standard JCR have any special notion of {{jcr:content}} child nodes
{quote}
The jcr:content child node is an established, builtin concept of jackraabits
nt:file.
[https://github.com/nabils/jackrabbit/blob/master/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/nodetype/builtin_nodetypes.cnd#L60-L62]
But you are right, limiting this to only "jcr:content" may infer application
specific knowledge.
On the other hand implementing this logic is not very well extensible yet.
We could instead (a) define a property on the configuration which sets the sub
path the resourceType should be checked on (defaults to the requested resource
itself), or (a) we provide an extension point where applications can plugin
custom matching logic.
> Processing pipeline with resourceType to check jcr:content as well
> ------------------------------------------------------------------
>
> Key: SLING-11589
> URL: https://issues.apache.org/jira/browse/SLING-11589
> Project: Sling
> Issue Type: Improvement
> Components: Extensions
> Reporter: Dirk Rudolph
> Priority: Major
> Fix For: Rewriter 1.3.4
>
>
> The ProcessorConfigurationImpl#match method currently checks the configured
> resourceType only on the requested resource [1]. This works as designed,
> however there are cases where a jcr:content child resource has a meaningful
> resourcetype for the rewriter and requested resource does not.
> This is for example the case for AEM's cq:Pages. Requests usually are made
> for the cq:Page resource (resourceType being cq:Page) and not for the
> jcr:content.
> A configuration should be made available to check the jcr:content as well
> (similar to unwrapResource).
>
> [1]
> https://github.com/apache/sling-org-apache-sling-rewriter/blob/7eb50dcd38e2e35ee597fa2e0b1fbfca0fe8b526/src/main/java/org/apache/sling/rewriter/impl/ProcessorConfigurationImpl.java#L435-L456
--
This message was sent by Atlassian Jira
(v8.20.10#820010)