Skip Navigation

[Résolu] Same item in different taxonomy creates a bug

This support ticket is created Il y a 3 années et 1 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.

This topic contains 1 réponse, has 1 voix.

Last updated by Ido Angel Il y a 3 années et 1 mois.

Auteur
Publications
#1404821

Hey Waqar,
Remember this?

https://toolset.com/forums/topic/allow-frontend-user-to-change-any-to-all-closed-by-mistake/

Well, there a bug...
Sorry to "wake up sleeping dogs"...
There's a bug with this code.
I have two different taxonomies (which I have applied this code to) but in each taxonomy there are items with the same name.
For example:
1) taxonomy called "published at" with an item in it called "times"
2) taxonomy called "bibliography paper" with an item in it called "times"
When I choose one item in a certain taxonomy, and press search, a strange thing happens: checkboxes for both "times" items are checked, in both search filters - "published at" and "bibliography paper", even though I checked only one of them before the search.
My guess is the checkboxes are checked becasue of the item's appearance in the URL Parameter, and once it's there, it checks every occurance of it in the search form (and naturally messes the results).
Maybe this code ahs anything to do with it?

add_shortcode( 'get-field-paramter', 'get_field_paramter_func');
function get_field_paramter_func($atts){
    $parameter = $atts['parameter'];
    $value = $atts['value'];
      
    if (!empty($_GET[$parameter]) && $_GET[$parameter] == $value) {
        return "selected";
    }
}

here's a live example for searching "הארץ" item inside "published at" but getting it checked in both taxnomies:

hidden link

any idea how to get around this?

Thanks!!

Ido

#1404835

My issue is resolved now. Thank you!