[Résolu] Search parent filter doesn't show all available options
This support ticket is created Il y a 7 années et 8 mois. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
I came across an interesting glitch. Hopefully I can explain it clearly.
My system is a multi-user system, where each person creates a ton of content. One of the types is a "Vendor." I was creating a view with a search filter, and the parent "vendor" was missing certain vendors that should have been there. I changed the filter to "show all available", and took a snapshot of it.
The select box only shows 1 "Walmart". I then took a picture of the vendor posts, and you can see there are actually (3) Walmarts. So for the first person who created the Walmart vendor, their search filter works fine, but for the rest, it does not because the ID of Walmart in the search box does not match the _wpcf_belongs_to.. of the results.
Hopefully that makes sense. The root problem is that the search filter select box is only pulling the first instance of "Walmart", and not all (3) like it should.
I replaced my custom "view-generated" select box with the default, and there is still a problem.
Now it appears the "display only available options" is not functioning. Now, the list contains every parent post, and not only the available ones. Since mine are all user generated, it cannot show other users posts.
I just had chance to re-visit this now, sorry for the delay in getting back to you but we have had a very high volume of support requests.
I re-ran my tests with the updated plugins and see that the issue with parent posts with the same name not appearing has been resolved.
Per your last comment about the setting to "display only available options" not working, I tested that and it appeared to work correctly also.
See the two attached screenshots "all" and "available".
I have 4 parent posts, Father, Father, Father, and Mother. Mother doesn't have any child posts to it.
So when I have "all" set, the dropdown shows all of the possible parent posts that I could select, i.e. every post of the parent post type.
When I have "available" set, the dropdown only shows those posts of the parent post type that have a child post assigned.
This is useful when you have several filters and you want to make a selection in one filter which then narrows down the options available in the next filter to only those which are relevant.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.