Skip Navigation

[Resuelto] Same item in different taxonomy creates a bug

This support ticket is created hace 4 años, 11 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

Este tema contiene 1 respuesta, tiene 1 mensaje.

Última actualización por Ido Angel hace 4 años, 11 meses.

Autor
Mensajes
#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:

enlace oculto

any idea how to get around this?

Thanks!!

Ido

#1404835

My issue is resolved now. Thank you!