Search with empty property fields returns no match

  • APCLO
  • Autore della discussione
  • Offline
  • Nuovo Utente
  • Nuovo Utente
Di più
10 Anni 6 Mesi fa #1833 da APCLO
Hello,
this is something I had already seen in the previous version but never asked about.

When you use the search module and no property field is filled in, the result is the message saying "Please make some selections".

I bound my search to a specific category and would like to get all the articles belonging to it if no value is entered.

Would it be possible to set up the module in order to display all of the articles if any property value is entered?

Thanks
Silvia

The greatness of a nation and its moral progress can be judged by the way its animals are treated --- Gandhi

Si prega Accesso o Crea un account a partecipare alla conversazione.

Di più
10 Anni 5 Mesi fa #1846 da openwire
It turned to be easy:

in /administrator/components/com_customproperties/helpers/cpquery.class.php, in getRows function around line 700 there's code looking like this:
Code:
if(! count($search_pars) > 0 ) { array_push($this->errors, "no pars"); return false; } if(!empty($bind_to_categories )) { $search_pars['bind_to_category'] = $bind_to_categories; }

swap these two conditions so it looks like
Code:
if(!empty($bind_to_categories )) { $search_pars['bind_to_category'] = $bind_to_categories; } if(! count($search_pars) > 0 ) { array_push($this->errors, "no pars"); return false; }

Now category filter is treated like other filters and query doesn't get halted.

I'd love to see this implemented in next releases at least as an option.

Cheers,
Kostya
I seguenti utenti hanno detto grazie : APCLO

Si prega Accesso o Crea un account a partecipare alla conversazione.

  • APCLO
  • Autore della discussione
  • Offline
  • Nuovo Utente
  • Nuovo Utente
Di più
9 Anni 6 Mesi fa #2232 da APCLO
thank you Kostya!

The greatness of a nation and its moral progress can be judged by the way its animals are treated --- Gandhi

Si prega Accesso o Crea un account a partecipare alla conversazione.

Tempo creazione pagina: 0.157 secondi