List all locked pages

Avatar

Avatar

amine74235389

Avatar

amine74235389

amine74235389

11-08-2017

Hi,

Is there a way to list all the pages locked in AEM? One of the common issues we have is people forgetting to unlock their pages. The idea is if they have a page where they can monitor all the locked pages, whether by the user or everyone, they'll be able to unlock them sooner.

Thanks

Amin

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

11-08-2017

When a page is locked - it has this prop:

Lock.png

What you can do is write a QueryBuilder query to fetch all pages in the AEM JCR that are locked - similiar to this: Get list of Activated or Deactivated Pages in CQ

Answers (3)

Answers (3)

Avatar

Avatar

amine74235389

Avatar

amine74235389

amine74235389

14-08-2017

Ok if I understand, this means I have to write code to get this working. It can't be done using the query builder available in CRX. In that case, I am going to have to find a tutorial somewhere for this, my knowledge is very limited.

Thanks again Donald.

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

14-08-2017

Using the Page API, you can get this information - see: Page (Adobe CQ 5.6.1 Java Documentation 5.6.1 API)

Avatar

Avatar

amine74235389

Avatar

amine74235389

amine74235389

14-08-2017

Thanks for the reply Donald. So I followed your suggestion and used query builder and was able to see all the locked pages in the site. I wrote it like this:

path=/content/website

property=jcr:content/jcr:lockIsDeep

property.value=true

The right side returns a list of all locked pages. I'm trying to figure out how to get it to display the author who locked the page. I can tell that the property is held in "jcr:lockOwner". Is there a way to display that as part of the query?