1
votes

As CQ/AEM creates corrupt pages if an author using the language copy tool to only copy children to the other language, but not the parent, I implemented a tool that checks for these corrupt pages and has a way to fix them. In CQ 5.6.1 I used the following XPath:

/jcr:root/content//*[@jrc:primaryType='cq:Page' and not(jcr:content/fn:name()='jcr:content')]

I'm now running the same code on an AEM 6 instance and this query doesn't work anymore though the error doesn't make sense to me:

/jcr:root/content//*[@jrc:primaryType='cq:Page' and not(jcr:content/fn:name((*))='jcr:content')]; expected: )

Though as you can see it added (*) in the fn:name function for some reason.

So, either how to fix this query for Oak or how could I check for corrupt pages in AEM 6?

1
you really should just try to fix that man. i'll tell you one thing. without the jcr:content/ part it works so you should be able to figure it out furtherub1k
not sure what you mean, but it doesn't for me if I try the query in CRXDE Lite. It doesn't throw an error, but also doesn't find the corrupt pages.Thomas

1 Answers

0
votes

This works for me on AEM 6.1

/jcr:root/content//element(*,cq:Page)[not(jcr:content)]