Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$pages->findOne() finds unpublished page #683

Closed
Toutouwai opened this issue Aug 20, 2018 · 2 comments
Closed

$pages->findOne() finds unpublished page #683

Toutouwai opened this issue Aug 20, 2018 · 2 comments

Comments

@Toutouwai
Copy link

Short description of the issue

The docs for $pages->findOne() say that the method filters for access control and published state in the same way as $pages->find() does. But for some reason it matches an unpublished page in the example below.

2018-08-20_152655

$pages->find() does not match the page, as expected.

Clean PW 3.0.110 installation, no hooks or modules (besides Tracy).

Setup/Environment

  • ProcessWire version: 3.0.110
ryancramerdesign added a commit to processwire/processwire that referenced this issue Sep 13, 2018
…didn't have exclusion/filter enabled if finding unpublished or hidden page that is editable & viewable to current user when the selector includes only reference to the page's id.
@ryancramerdesign
Copy link
Member

Thanks @Toutouwai I have pushed a fix for this issue

@Toutouwai
Copy link
Author

Thanks for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants