Jump to content

Nested repeater, pages find and subfield selector - different results depending on user.


Recommended Posts

Posted

I have this weird problem where results of pages->find are different depending on the user I am logged into even though I use check_access=0 or include=all

The field I am looking into as a repeater named ingredientWrapper that has a nested repeater called ingredientList which contains a page reference element named ingredient. 

This returns the correct result as superuser and no results as guest. ( I know that include=all and check_access are superflous)

echo $pages->find('template=recipe, include=all, check_access=0, ingredientWrapper=[ingredientList.ingredient=1031]'); 

This returns all the results including the ones that I want to filter out as guest and superuser. 

echo $pages->find('template=recipe'); 

I tried a simple subselector and that works fine also for the guest (e.g image.alt=test)

Any pointers?

Posted

Okay I fixed it by changing it to this and removing the square bracket: ingredientWrapper.ingredientList.ingredient=1031 

Seems inconsistent to me that it does work with one notation and not the other one depending on the user. 

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