Skip to main content
Level 2
Oct 16, 2015 2:27 AM UTC
Solved

CQ 5.6.1: Issue with Page.listChildren

Hi, I hope you can help.

We care currently upgrading from 5.4 to 5.6.1, and everything has been going mostly fine till we published a couple of components to the publish server that use Page.listChildren to generate menus automatically.

The pages the components are looing at are in /content so I can't see why this would be an issue even with the new permissions rescrtictrions. The components also use isValid & isHideInNav to build the menu.

Everything works fine in preview, so I am assuming it's something to do with permission for the anonymous user.

Has anybody had any similar issues?

Regards

Damian.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
DPMAccepted solution
Level 2
Oct 16, 2015 2:27 AM UTC

The issue was with checking if the page is activated. It was always returning false for the publish server. I guess since this is pretty much redundant as it must be activated to be there I change the condition to check if it was on publish as well.

 

-D

3 replies

smacdonald2008
Level 10
Oct 16, 2015 2:27 AM UTC

Thank you for posting what the issue was. 

Translate
DPMAuthorAccepted solution
Level 2
Oct 16, 2015 2:27 AM UTC

The issue was with checking if the page is activated. It was always returning false for the publish server. I guess since this is pretty much redundant as it must be activated to be there I change the condition to check if it was on publish as well.

 

-D

Translate
DPMAuthor
Level 2
Oct 16, 2015 2:27 AM UTC

After testing its nothing to do with the permissions of the anonymous user. After granting the anonymous user on publish admin right it still could not show child pages, and on the reverse a user with the same rights as the anonymous user in auth can still see child pages.

The only difference between how I use listChildren and how it is used in CQ foundation components is that I always do an isHideInNav and isValid check before display.

I'm hoping to be granted permissions on publish diagnose this issue as its a long process otherwise.

Regards

Damian.

Translate