Live copy is not working for programatically created pages | Community
Skip to main content
Singaiah_Chintalapudi
Level 7
May 24, 2016
Solved

Live copy is not working for programatically created pages

  • May 24, 2016
  • 7 replies
  • 2057 views

Hi,

I've created the live copy and it is working fine for the existing content. However, If I create a page page programatically using JCR api then live copy is not copying that page to Spanish but if I create the same page manually in English then live copy is copying that page to Spanish. 

Any idea why live copy is not able to copy the programatically created pages to spanish.

Thanks.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Singaiah_Chintalapudi

noksc wrote...

Hi,

I've created the live copy and it is working fine for the existing content. However, If I create a page page programatically using JCR api then live copy is not copying that page to Spanish but if I create the same page manually in English then live copy is copying that page to Spanish. 

Any idea why live copy is not able to copy the programatically created pages to spanish.

Thanks.

 

JCR API is not adding cq:lastModified property to the newly created node. So live copy is not able to understand its timestamp. I had to add this property and now live copy is working fine.

7 replies

smacdonald2008
Level 10
May 25, 2016

When you create a page using an API, you need to make sure it has the same props as a page that is created manually, I am not even sure this is supported. I will check.

They will ask why are you trying to create a page for a LiveCopy using an API? 

Adobe Employee
May 25, 2016

Hi,

Can you share the lines in the code you are using to create the page?

Regards,

Opkar

Singaiah_Chintalapudi
Singaiah_ChintalapudiAuthorAccepted solution
Level 7
May 26, 2016

noksc wrote...

Hi,

I've created the live copy and it is working fine for the existing content. However, If I create a page page programatically using JCR api then live copy is not copying that page to Spanish but if I create the same page manually in English then live copy is copying that page to Spanish. 

Any idea why live copy is not able to copy the programatically created pages to spanish.

Thanks.

 

JCR API is not adding cq:lastModified property to the newly created node. So live copy is not able to understand its timestamp. I had to add this property and now live copy is working fine.

Adobe Employee
May 26, 2016

Were you using the PageManager API or creating Nodes?

Regards,

Opkar

Singaiah_Chintalapudi
Level 7
May 26, 2016

Opkar Gill wrote...

Were you using the PageManager API or creating Nodes?

Regards,

Opkar

 

I am using JCR API. 

smacdonald2008
Level 10
May 26, 2016

Great pickup -  i suspected it was a prop issue as I suggested. Thank you for posting this! 

Singaiah_Chintalapudi
Level 7
May 26, 2016

smacdonald2008 wrote...

Great pickup -  i suspected it was a prop issue as I suggested. Thank you for posting this! 

 

Thanks Scott.