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?
jcr:content/
part it works so you should be able to figure it out further – ub1k