Hi guys, imagine the following scenario:
I have a custom Template, let's call it my-template. This template is used to create Pages with properties called propA, propB and propC. My Sling scripts under /apps/<...>/components expects the Pages under /content to have those properties.
This is deployed to production environment and everything works fine.
Now, the business needs changes and I need to change my-template. It now has properties propA, propX and propY, where:
Then, my questions are:
I hope I could get my idea through. Shall you have any question, please, let me know.
Thank you in advance.
Solved! Go to Solution.
Hi.
How about this tool: https://github.com/HS2-SOLUTIONS/hs2-aem-commons/tree/master/on-deploy-scripts-framework?
(I'm not sure if it is suitable for production environments)
Regards,
Daniel.
question - how many pages in there which have old properties ? if they are few, you can write a groovy script or java code to update those properties. If those pages are in great number, you still can use the same script but need to be very careful while running it. You can run the script on the chunks to make sure that is works fine, other option is also fine -- put the condition inside the code to make it backward compatible with new properties but it is little weird to check the conditions for non existing properties in new pages.
Hi, thank you very much for your reply.
Unfortunately my Production environment is controlled by another team and I do not access to run scripts or even fix the Page nodes by myself.
I can only send them packages to be installed via Package Manager.
I have definitely think about make the code backward compatible, but it doesn't seem to me as a good practice. In the future we might have new updates and then the code complexity could get to a point where it is very high just to keep the backward compatibility.
Views
Replies
Total Likes
Hi.
How about this tool: https://github.com/HS2-SOLUTIONS/hs2-aem-commons/tree/master/on-deploy-scripts-framework?
(I'm not sure if it is suitable for production environments)
Regards,
Daniel.
Hi Levif,
the sling pipes https://sling.apache.org/documentation/bundles/sling-pipes.html Or http://aemfaq.blogspot.com/2013/06/content-find-and-replace-globally.html can help you.
Thanks,
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Likes
Replies