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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...