Hi Team,
We are creating pages programatically on publisher it self, and setting sling vanity urls. We have observed that few pages working fine but few of them goes 404.
Path pattern is
Content path is : /content/myproject/products/product-categoty/product.html
Vanity path is : /content/myproject/product.html
I have checked the error logs on publisher.
GET /content/myproject/vivoy128gb-storagegold-8gbram.html HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource/content/myproject/vivoy128gb-storagegold-8gbram.html not found
When we travers page through crx/de repository to actual page "/content/myproject/products/product-categoty/product.html" and performed dummy save operation same page started working.
Also another behaviour is after few day's same page went 404, without any content update or any other operation. Then again need to do the same practice.
Solved! Go to Solution.
Views
Replies
Total Likes
Hello @VB_Dev First off - why are you creating pages on publish server? I mean the usual approach could have been : create pages on author and then publish it - so that in case you mess up, you can do something about it. If you mess up here - there's very little you can do.
Anyway, second point -
Resource/content/myproject/vivoy128gb-storagegold-8gbram.html not found
Can you check if you are appending "Resource" with content path by any chance while resolving the pages?
Thanks
-Bilal
Hello @VB_Dev First off - why are you creating pages on publish server? I mean the usual approach could have been : create pages on author and then publish it - so that in case you mess up, you can do something about it. If you mess up here - there's very little you can do.
Anyway, second point -
Resource/content/myproject/vivoy128gb-storagegold-8gbram.html not found
Can you check if you are appending "Resource" with content path by any chance while resolving the pages?
Thanks
-Bilal
If we hit actual content path then page load fine on publisher, but same page we hit through vanity url goes 404.
After digging found that below query only traverse 1 lacks node and my case more than 2 lacks pages with vanity urls present.
SELECT sling:vanityPath, sling:redirect, sling:redirectStatus FROM nt:base WHERE sling:vanityPath IS NOT NULL
Ah! that was the culprit.
If you have not implemented a solution yet, I'd suggest you create a custom oak: index definition.
Thanks
-Bilal
Hello @VB_Dev -
Couple of things here :
Views
Like
Replies