Jump to content

Potential bug with selector subfields for guest users


Recommended Posts

Posted

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.

Posted

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?

Posted
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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...