Jump to content
martind

subfield-selector for guest problem

Recommended Posts

hello,

i try to use a subfield-selector to find pages with tagged files (downloads) inside a repeater (content_blocks):

wire('pages')->find("template=basic-page, content_blocks.downloads.tags!=''");

now, this works as expected when i'm loggedin as superuser, but not as guest. it behaves like no subfield-selector than .count is possible for loggedOut users. any idea what the problem is?

ProcessWire 3.0.123
PHP Version 7.0.32

thanks,
martin

Share this post


Link to post
Share on other sites

thank you both.

neither check_access=0 nor include_all=1 works here (even in the field settings, the access-toggle for api usage is set true for both, content_blocks repeater and downloads) . instead i got it working (for both, suberadmin and guest) by doing it like that (similar to Cengiz' solution from the post below):

wire('pages')->find("template=basic-page, content_blocks=content_blocks.downloads.tags!='', check_access=0");

maybe this has some impact on further usage of the including function, but for this case it works. Any tips are welcome for a more certain syntax.

  • Like 1

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...