Jump to content

Potential bug with selector subfields for guest users


alexm
 Share

Recommended Posts

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

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

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

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
 Share

  • Recently Browsing   0 members

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