Expand my Community achievements bar.

SOLVED

Get List of locally created pages from local country site which are not rolled out fom master

Avatar

Level 8

Hi All,

 

I have a MSM website, wherein I have a local country site under this path(/content/cl-ma-sp/xxx).

I want to list of locally created pages from "/content/cl-ma-sp/xxx", not coming from the master.

Can anyone share the sql2 query to retriew the results. Please find the attachments.

 

Vani1012_0-1665672288026.pngVani1012_1-1665672339908.png

Can anyone share the query.

 

Thanks,

Vani.

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

To check if page are part of live copy or not, you must check if there is a mixin type cq:LiveRelationship in present or not and then write a sql query on that

 

The information is stored the following way .

 

- cq:LiveRelationship mixin type

Any livecopy page has such a mixin type on its jcr:content node.
If not, the page has been at some point detached, or manually created via the authoring interface outside of a Livecopy action (create or rollout)

 

- cq:LiveSyncCancelled mixin type

Added on jcr:content nodes of Livecopy pages that were suspended.

If the suspension if effective for child pages as well : a cq:isCancelledForChildren=true property is added on the same node.



Arun Patidar

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi,

To check if page are part of live copy or not, you must check if there is a mixin type cq:LiveRelationship in present or not and then write a sql query on that

 

The information is stored the following way .

 

- cq:LiveRelationship mixin type

Any livecopy page has such a mixin type on its jcr:content node.
If not, the page has been at some point detached, or manually created via the authoring interface outside of a Livecopy action (create or rollout)

 

- cq:LiveSyncCancelled mixin type

Added on jcr:content nodes of Livecopy pages that were suspended.

If the suspension if effective for child pages as well : a cq:isCancelledForChildren=true property is added on the same node.



Arun Patidar

Avatar

Community Advisor

You can run the below XPath query in crxde and verify it. Live copies will have jcr:mixinTypes=cq:liveRelationship. 

 

XPath Query 

/jcr:root/content/cl-ma-sp/xxx//element(*, cq:Page)[jcr:content/jcr:mixinTypes and (not(jcr:like(jcr:content/jcr:mixinTypes, 'cq:LiveRelationship')))]

This should return all the pages which has jcr:mixinTypes but not have cq:LiveRelationship

 

The mixinTypes will be added moment you activate a page , it will be added with mix:versionable. 

Unpublished pages wont have  mixinTypes property.