Soma Posted February 7, 2013 Share Posted February 7, 2013 When I have a page field that is dereferenced as single, and the pages to select from are hidden the following selector doesn't return matches. If the page is not hidden it works. Also when not using subfield selector it works even with hidden pages. No, include=hidden doesn't make a difference. I know one could make the parent of the selectable pages hidden instead, just thought I mention it. Example code $pages->find("template=basic-page, select_page.title=foo"); If the "foo" page is hidden it doesn't find the pages. Link to comment Share on other sites More sharing options...
ryan Posted February 8, 2013 Share Posted February 8, 2013 Soma, that's a good find. I'm pretty sure I know why this is the case. Right now when it executes a match on other pages, it doesn't specify an "include" setting, meaning pages can be excluded. It probably should not be that way. I know where to make the change to fix it (it will be easy), but the question I'm struggling with is whether it should be "include=all" always for subfields? After all, we're not technically matching the pages the subfields live on, just the page that references them. It seems to me like it should always be include=all, but I also worry if I'm not thinking through all possible side effects. Link to comment Share on other sites More sharing options...
Soma Posted February 8, 2013 Author Share Posted February 8, 2013 Thanks for the response. Ithink this would be no problem as youre also able to select hidden pages. Link to comment Share on other sites More sharing options...
ryan Posted February 9, 2013 Share Posted February 9, 2013 Thanks for finding this. I've updated it so that it now includes hidden. I'm still debating whether this shouldn't instead be: "include=hidden, check_access=0" or even "include=all". Link to comment Share on other sites More sharing options...
apeisa Posted February 9, 2013 Share Posted February 9, 2013 My gut feeling is that it should be include everything but not unpublished pages. That is tricky question though. Link to comment Share on other sites More sharing options...
thetuningspoon Posted August 9, 2017 Share Posted August 9, 2017 Just ran into this issue today. It seems like the subfield should disregard access settings since you are not actually getting the subfield, but are only checking for its relationship to the page you are getting. I see that there is still a todo note about this in FieldtypePage.module 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