alexm Posted February 27, 2023 Share Posted February 27, 2023 I'm getting peculiar behaviour using subfield selectors. $page->children("hero_image_section.images.count>0") The above if logged in returns the WireArray of pages. If you aren't logged, it returns nothing. No "access" related template or field settings have been changed. Link to comment Share on other sites More sharing options...
gebeer Posted February 27, 2023 Share Posted February 27, 2023 Have you tried adding include=all to your children selector? 1 Link to comment Share on other sites More sharing options...
alexm Posted February 27, 2023 Author Share Posted February 27, 2023 Sorry @gebeer I should have added, that yes when I add the addition of include=all it works just fine, but I don't understand why I would need to for this use case? Is it something to do with the fact that "hero_image_section" is a FieldsetPage and therefore it's another page it's getting the image from? Link to comment Share on other sites More sharing options...
gebeer Posted February 27, 2023 Share Posted February 27, 2023 3 minutes ago, alexm said: Sorry @gebeer I should have added, that yes when I add the addition of include=all it works just fine, but I don't understand why I would need to for this use case? Is it something to do with the fact that "hero_image_section" is a FieldsetPage and therefore it's another page it's getting the image from? Yeah, I guess that is why. My understanding is that every FieldsetPage field value is stored on page in the Admin pagetree behind the scenes. And by default those are not accessible for guest users. 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