{"action":"closed","issue":{"url":"https://api.github.com/repos/ryancramerdesign/ProcessWire/issues/1597","repository_url":"https://api.github.com/repos/ryancramerdesign/ProcessWire","labels_url":"https://api.github.com/repos/ryancramerdesign/ProcessWire/issues/1597/labels{/name}","comments_url":"https://api.github.com/repos/ryancramerdesign/ProcessWire/issues/1597/comments","events_url":"https://api.github.com/repos/ryancramerdesign/ProcessWire/issues/1597/events","html_url":"https://github.com/ryancramerdesign/ProcessWire/issues/1597","id":124729024,"number":1597,"title":"$pages->findOne error when returning a hidden page without include=all","user":{"login":"TomS-","id":4595662,"avatar_url":"https://avatars.githubusercontent.com/u/4595662?v=3","gravatar_id":"","url":"https://api.github.com/users/TomS-","html_url":"https://github.com/TomS-","followers_url":"https://api.github.com/users/TomS-/followers","following_url":"https://api.github.com/users/TomS-/following{/other_user}","gists_url":"https://api.github.com/users/TomS-/gists{/gist_id}","starred_url":"https://api.github.com/users/TomS-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomS-/subscriptions","organizations_url":"https://api.github.com/users/TomS-/orgs","repos_url":"https://api.github.com/users/TomS-/repos","events_url":"https://api.github.com/users/TomS-/events{/privacy}","received_events_url":"https://api.github.com/users/TomS-/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ryancramerdesign/ProcessWire/labels/Fixed","name":"Fixed","color":"006b75"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-04T10:06:49Z","updated_at":"2016-03-10T10:50:55Z","closed_at":"2016-03-10T10:50:55Z","body":"If you are finding a page that is hidden without including \"include=all\" it will return an error rather than 0 results. \r\n```\r\nError: Call to a member function viewable() on a non-object (line 342 of /var/sites/a/asg.returnonideas.co.uk/public_html/wire/core/Pages.php) \r\n\r\nThis error message was shown because: you are logged in as a Superuser. Error has been logged.\r\n```\r\n\r\nTo replicate: \r\nCreate a template\r\nCreate a page with new template\r\nSet template to hidden\r\n\r\nUse $pages->findOne(\"template=newtemplate\")->children() \r\n\r\nThis should return the error. I know it's only a small bug, however I haven't tested it with two pages using this template with the first one hidden."}}