Skip Navigation

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

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

Marqué : 

This topic contains 10 réponses, has 2 voix.

Last updated by Nigel Il y a 7 années et 6 mois.

Assisted by: Nigel.

Auteur
Publications
#429684
Capture2.JPG
Capture1.JPG

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.

#429688

I have created a work-around for now, by using a view to create the select filter instead of the shortcode.

<!-- wpv-loop-start -->
<select multiple id="wpv_control_multi-select_wpv-pr-child-of" name="wpv-pr-child-of[]" style="" class=" js-wpv-filter-trigger wpcf-form-select form-select select nice-select btn-input-group" data-currentposttype="vendor">
  		<wpv-loop>
              <option value="[wpv-post-id]" class="wpcf-form-option form-option option">[wpv-post-title]</option>
 		 </wpv-loop>
		</select>
	<!-- wpv-loop-end -->
#429725

Nigel
Supporter

Languages: Anglais (English ) Espagnol (Español )

Timezone: Europe/London (GMT+01:00)

Screen Shot 2016-08-29 at 15.35.52.png

Hi Adam

What's generating your Capture1.JPG screenshot?

I ran a quick test whereby I created custom posts called Parent and Child.

I created a few Parent posts, including 3 posts all with the same title of "Father".

When I created a Child post and went to assign the parent, all of the possible parents were included (see screenshot).

That's in the normal back-end editing screens.

Are you using a CRED form to add the child post?

#429728

Nigel
Supporter

Languages: Anglais (English ) Espagnol (Español )

Timezone: Europe/London (GMT+01:00)

Screen Shot 2016-08-29 at 15.42.37.png

I ran a quick test with CRED, as well, and had the same result.

If you could let me know a little more about how you are adding your content to see that multi-select box.

And can you verify that in the back-end edit screens you can create a child post and add any one of the Walmart parents?

#429736

Nigel,
The problem is with a parametric search filter. That is where the select box is from.

As you have mentioned, this problem does not exist with applying parents in a CRED form, only when using the parent as a filter in a search.

#429749

Nigel
Supporter

Languages: Anglais (English ) Espagnol (Español )

Timezone: Europe/London (GMT+01:00)

Hi Adam

I see it now, thanks for the clarification.

Having confirmed the issue I have escalated it to our developers, and as soon as there is anything to report I will let you know.

#433121

Nigel
Supporter

Languages: Anglais (English ) Espagnol (Español )

Timezone: Europe/London (GMT+01:00)

Hi Adam

Just a quick update to say that the issue has been identified and will be fixed in the next release.

In the meantime, an errata is being prepared with a workaround which will be published soon at https://toolset.com/errata/.

If you encounter any problems, please let me know.

#433139

Nigel
Supporter

Languages: Anglais (English ) Espagnol (Español )

Timezone: Europe/London (GMT+01:00)

#440808

Nigel
Supporter

Languages: Anglais (English ) Espagnol (Español )

Timezone: Europe/London (GMT+01:00)

Hi Adam

Last night we rolled out minor-version updates of several plugins of the Toolset suite, which should have fixed this problem.

Be sure to have a current backup available and then apply all of the Toolset updates, and then re-test.

If you still see the problem then please let me know so I can investigate.

#441063

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 had to go back to my script.

#443173

Nigel
Supporter

Languages: Anglais (English ) Espagnol (Español )

Timezone: Europe/London (GMT+01:00)

available.png
all.png

Hi Adam

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.