SaaS CMS has officially launched! Learn more now.

FindAllPagesWithCriteria not getting the pages the users hasn't access to



I'm a bit puzzled over how the FindAllPagesWithCriteria function works. This is supposed to get all the pages, regardless if the users has access rights to it or not. This doesn't work at all for me, only the pages that the users has access right to gets collected, so FindPagesWithCriteria and FindAllPagesWithCriteria get exactly the same collection of pages.

The reason that I wan't to get hold of pages that a user doesn't have access right to, is that i wan't to show values from some of the properties on these, if the page is tagged (using categories) in a certain way.

Anyone that has had the same problem with FindAllPagesWithCriteria?

// Regards, Torbjörn

Mar 17, 2011 18:54

This is a known bug, fixed in CMS 6 R2. See bug #55341 in the bug list.

Mar 17, 2011 20:27


Thanks for the info, but this isn't a scheduled job, so I unfortunally don't think this applies to this example, since the bug description said that the pages were collected if the job was run manually.

Mar 18, 2011 16:41

If the job is started manually its from admin mode and the user most probably has full access to all pages.

Edit: Removed accidental code formatting.

Edited, Mar 18, 2011 16:58

Yeah, that sounds correct. Just have to wait for R2 then....


Mar 22, 2011 9:24

I've encountered this just now. FindAllPagesWithCriteria return 10 items for one user and 11 for another. It's not code inside a scheduled job.

FindAllPagesWithCriteria seems to work as expected when it comes to returning pages waiting for it's start/stop publish datetime to occur though. So it's not completely worthless in CMS 6 R1.

Edited, May 16, 2011 16:50

It can happen outside scheduled jobs too, the bug is that it doesn't ignore access rights as it should. A scheduled job started by the scheduler is run as an anonymous user while when started manually it will run as the logged in administrator, that's why it might differ greatly in scheduled jobs in particular but the problem is not isolated to scheduled jobs.

May 17, 2011 6:35

Yes, since scheduled jobs was mentioned before I just thought I'd clarify...

Have you confirmed that the bug is fixed in 6 R2?

May 17, 2011 8:37

Ah, my double clarification wasn't uncalled for then :) I haven't checked R2, please post back your results if you do.

May 17, 2011 8:38
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.