Hi guys,
We have a custom html transformer configured as follows:
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="nt:unstructured"
contentTypes="[text/html]"
enabled="{Boolean}true"
generatorType="htmlparser"
order="{Long}1"
serializerType="htmlwriter"
transformerTypes="[linkchecker,jsonlinksmapper]">
<generator-htmlparser
jcr:primaryType="nt:unstructured"
includeTags="[BUTTON,IW-ORDER-SETUP-FLOW,DIV,META,/META,A,/A,/AREA,FORM,BASE,LINK,SCRIPT,BODY,/BODY,VIDEO,/VIDEO,ASIDE,/ASIDE,SECTION,/SECTION]"/>
</jcr:root>
Most of the time it works fine but if something does go wrong, it can actually take down the login screen. I see an exception with the root exception of this:
Caused by: java.io.IOException: Unable to get component of class 'interface org.apache.sling.rewriter.Transformer' with type 'jsonlinksmapper'.
at org.apache.sling.rewriter.impl.PipelineImpl.getPipelineComponent(PipelineImpl.java:161)
at org.apache.sling.rewriter.impl.PipelineImpl.init(PipelineImpl.java:103)
at org.apache.sling.rewriter.impl.ProcessorManagerImpl.getProcessor(ProcessorManagerImpl.java:480)
... 73 common frames omitted
I can usually fix whatever is wrong with the transformer (and sometimes it seems to be something else wrong with the bundle), but it's much harder if I can log in to crx etc. I can still use curl but it is pretty hard to diagnose issues without the system console, crx, etc.
I presume that the issue is that this html transformer is attempting to process the login screen and failing. I'd like to restrict the pipeline to only attempt to invoke it on specific paths or somehow exclude system paths.
Note that I'm not trying to fix the transformer. It's working fine at the moment.
Thanks!