vknt Posted December 6, 2011 Share Posted December 6, 2011 Hi, [edit] I've also found the template of the children was on not viewable by guest-user. That also seems part of the problem. In any case I got it back working. I've just been searching for 2 hours for this problem. It was really weird, all of a sudden chrome would show the output of a foreach loop but firefox and safari wouldn't. So what was happening? I had been editing the acces of the parents template and mistakenly checked "can't have children". So I'm guessing the api didn't output the values because he thought there could not be children. But they were there because I had added them before I (mistakenly) changed the template. So I'm suggesting a check somewhere so this cannot happen.Perhaps a warning when changing the template access or a check so that when asking for children in the API it checks if there are there regardless of the access settings of the template. best regards Valentijn Link to comment Share on other sites More sharing options...
ryan Posted December 6, 2011 Share Posted December 6, 2011 That "can't have children" isn't enforced by the API. That's just enforced in the admin control panel. It's perfectly valid to have a page with children and then change it's template to "can't have children" just to ensure that no more are added. Likewise, you can set it that no new pages using a given template can be created, but that doesn't mean that the existing ones have to be killed off. I've also found the template of the children was on not viewable by guest-user. That also seems part of the problem. In any case I got it back working. Glad you got it working. What you probably needed in your selector was "include=all" or "check_access=0" to ensure that it would include pages the user didn't have access to. See the Selectors section at: http://processwire.com/api/cheatsheet As for the Chrome vs Firefox and Safari thing, I have no idea. But Chrome is trying to one-up everyone, I know that. Link to comment Share on other sites More sharing options...
vknt Posted December 7, 2011 Author Share Posted December 7, 2011 Ok, thx for the heads up Ryan! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now