Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Activate only active pages but not modified pages

Avatar

Level 2

Hi, another tricky one, under /etc/replication/treeactivation.html you can activate filtering by only modified and only activated and ignoring deactivated pages, is there a way (using curl) to activate only active pages but ignoring modified pages?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Ronny, I dont think there is an option for 'ignoremodified'

however, I didnt exactly get your usecase. what do you mean by 'to activate only active pages but ignoring modified pages'

do you mean ignoring modified pages which are already activated and activate only the new activated pages ??

View solution in original post

9 Replies

Avatar

Level 10

Hi, you can use

curl -u admin:admin -F cmd=activate -F ignoredeactivated=true -F onlymodified=false

-F path=/content/project http://localhost:4502/etc/replication/treeactivation.html

Avatar

Level 2

Thanks, but onlymodified=false includes both modified and non-modified pages.

Avatar

Level 10

Did you tried executing it?

Avatar

Level 2

Yes, what I would need is a ignoremodified option, but it doesn't seem to exist, in order to do a reactivate=true and ignoremodified=true.

Avatar

Level 4

Ronny Fallas wrote...

Yes, what I would need is a ignoremodified option, but it doesn't seem to exist, in order to do a reactivate=true and ignoremodified=true.

 

I hope this link will help you

https://gist.github.com/sergeimuller/2916697

Avatar

Correct answer by
Level 10

Hi Ronny, I dont think there is an option for 'ignoremodified'

however, I didnt exactly get your usecase. what do you mean by 'to activate only active pages but ignoring modified pages'

do you mean ignoring modified pages which are already activated and activate only the new activated pages ??

Avatar

Level 2

Thanks for the commands, but there is no indeed option to ignore modified pages, at least from the standard tree activation options.

This is the case:

There is a backup instance where we need to move content only when the release is approved in production and everything is working as expected.

We cannot move them via packages, because of a previous issue where doing in that way, previously deactivated pages were activated again. So, we switched to tree activation, where you have the option to do a replication ignoring deactivated pages, the downside, is that the tree activation bypasses the approval workflow, which is completely undesired.

Then, now I need a way to activate (that is, replicate in the end) only active pages that are not modified (that is, page updates that are pending to be approved).

Avatar

Employee Advisor

If you want to move content from production instance to backup instance then why not create and copy packages separately for author and publish instance. You can create 2 packages one on Prod author and one on Prod publish and move them over to backup author and publish respectively. With this approach you don't need to activate any pages after the package install operation. 

Avatar

Administrator

Hi Ronny Fallas

Please look at the cURL commends mentioned.

                                        

Activate

 

curl -u admin:admin -X POST -F path="/content/path/to/page" -F cmd="activate" http://localhost:4502/bin/replicate.json

  
 

Deactivate

 

curl -u admin:admin -X POST -F path="/content/path/to/page" -F cmd="deactivate" http://localhost:4502/bin/replicate.json

  
 

Tree Activation

 

curl -u admin:admin -F cmd=activate -F ignoredeactivated=true -F onlymodified=true

 

-F path=/content/geometrixx http://localhost:4502/etc/replication/treeactivation.html

  

 

For Full set of commands please have a look at the link: - https://gist.github.com/sergeimuller/2916697

I hope this would help you.

Thanks and Regards

Kautuk Sahni



Kautuk Sahni