jcr - AEM rollout configuration not working for blueprint to live copy flow triggered from code -
i have setup blueprints , live copies experiencing weird behavior.
example 1:
- edit title of page (blueprint) using ui -> title gets set in live copy
example 2:
- edit title of page (blueprint) using code -> title gets set in blueprint does not set in live copy
code:
session session = resourceresolver.adaptto(session.class); resource brandpageresource = resourceresolver.getresource("/content/platform-blueprints/company/nl/brands/439"); page brandpage = brandpageresource.adaptto(page.class); resource brandpagecontentresource = brandpage.getcontentresource(); node brandpagecontentnode = brandpagecontentresource.adaptto(node.class); try { brandpagecontentnode.setproperty(jcr_title, "new-title-from-endpoint"); } catch (repositoryexception e) { log.error("error initializing components", e.getmessage(), e); } session.save();
does know why happening , how can fix this?
when change node's property surrounding page not update on cq:lastmodified property , page not marked changed in ui well.
you use pagemanager.touch() update cq:lastmodified , cq:lastmodifiedby properties of page.
using resources instead of nodes might trick - not sure one.
Comments
Post a Comment