Exception occurred while trying to restore version of a page
Hi everyone,
I'm currently trying to restore version on multiple pages.
I'm using :
pageManager.restore(pageToRestore.getPath(), revision.getId());
On some pages I got this issue :
com.day.cq.wcm.api.WCMException: Unable to restore version.
at com.day.cq.wcm.core.impl.page.PageManagerImpl.restore(PageManagerImpl.java:1178) [com.day.cq.wcm.cq-wcm-core:5.12.188]
...
Caused by: javax.jcr.nodetype.ConstraintViolationException: Property is protected: jcr:created = 2023-06-14T10:55:59.526Z
When I checked in the crx/de, this page has the jcr:created property marked as protected and auto created (On some other pages this property is not protected).
I tried to create a page from scratch with the interface and create / restore a version also with the interface and it works well whereas the property was also marked as protected ...
I don't understand why it is not working while using the pageManager.
Thanks a lot for any help.