MarkE Posted July 25, 2022 Posted July 25, 2022 I'm trying to use the owner selector to select on the id of the 'owner' page for a repeater. For most of the repeaters I have, this seems to work fine. However, there is one instance where it doesn't work and I can't see why not. As a simple test, I used a selector like: $p = $pages->get("template=repeater_sale_item, sale_item.owner.id=25348"); That works, but $p = $pages->get("template=repeater_stage, stage.owner.id=19363"); returns a null page. Investigating more closely, the generated 'owner selector' for this is 'templates_id=43|53, include=all, get_total=0, id=19363, stage.count>0' It is stage.count>0 that is causing the problem - if I remove that from the selector then it finds the owner page correctly. However this owner page DOES have 9 'stage' repeaters and executing d($page->stage->count); on the page in the Tracy console yields the correct result of 9. None of the stages are hidden/unpublished etc. So why does stage.count>0 fail? ? See the image below to illustrate the issue:
Jonathan Lahijani Posted December 13, 2023 Posted December 13, 2023 @MarkE Were you able to get this working?
MarkE Posted December 13, 2023 Author Posted December 13, 2023 (edited) 14 hours ago, Jonathan Lahijani said: Were you able to get this working? The specific problem above was fixed in v3.0.203. There were other problems - see https://github.com/MetaTunes/CustomDependSelects Does that help? (If it does, maybe I should add it to the modules library?) Edited December 13, 2023 by MarkE Clarification
Jonathan Lahijani Posted December 14, 2023 Posted December 14, 2023 I originally thought the issue you mentioned was the same issue I was having, but it turns out I was using my selector incorrectly.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now