Bug in WHERE clause after search all in dropdown

Status
Not open for further replies.

VOI

Member
Hi,

searching for strings in dropdowns using the "Search all" plugin does not seem to work - I never get any matching records.

When entering the string "label" in the "Search all" field above the list and turning on Fabrik Debug using "fabrikdebug=1", the WHERE clause shown in the section "list GetData" goes as follows:

Code:
WHERE ( (LOWER(`table`.`dropdown`) REGEXP 'LOWER('label')' OR LOWER(`table`.`dropdown`) LIKE '[\"LOWER(\\'label\\')\"%' OR LOWER(`table`.`dropdown`) LIKE '%\"LOWER(\\'label\\')\"%' OR LOWER(`table`.`dropdown`) LIKE '%\"LOWER(\\'label\\')\"]') )

There seem to be to many quotes , backslashes and double-quotes in the statement (e.g. the quote between REGEXP and LOWER).

Searching in databasejoins and other fields works fine.

Could some please check the code generating the SQL statement. Thanks a lot.

Chris
 
Seems like a silly question, but are you using the word 'label' just as an example, or are you actually searching for that term?

I only ask, because we use 'label' as a field alias in some of our filter handling querying, and it's possible this might be causing unforeseen side effects if actually searching for that word.

-- hugh
 
Seems like a silly question, but are you using the word 'label' just as an example, or are you actually searching for that term?

I only ask, because we use 'label' as a field alias in some of our filter handling querying, and it's possible this might be causing unforeseen side effects if actually searching for that word.

Oh, also, can you check what your magic_quotes_gpc is set to in your PHP ini settings?

-- hugh
 
Seems like a silly question, but are you using the word 'label' just as an example, or are you actually searching for that term?

I only ask, because we use 'label' as a field alias in some of our filter handling querying, and it's possible this might be causing unforeseen side effects if actually searching for that word.

Oh, also, can you check what your magic_quotes_gpc is set to in your PHP ini settings?

-- hugh
 
'label' was just an example - same as 'table'.'dropdown'.

The real values are 'projects.saving_type' for the dropdown element to search in and 'negotiation' as search phrase.

Chris
 
I would like to bump this too. You can see this not working in action at: demo.rotaryswing.com/technical-faq the "sub-category field" is not showing up in search results. Sub category field is in brackets [ SUB CAT ]
 
I want to say this, I have two dropdowns and neither of them are searchable even after adding them to the search all in the list.
 
dropdown elements are only searchable on the stored values, not the labels. Might this explain what you are seeing?
 
Same issue here - entered the value instead of the label. Still no results.

Moreover it would be really helpful if the user could search for the dropdown label since there is no way for him to know about the dropdown value as it is not shown on the frontend. E.g. I am using 'mc' as value for the label 'Material Change'.
 
Searching on values for dropdowns should now be fixed.
Moreover it would be really helpful if the user could search for the dropdown label
I agree it would be useful. Unfortunately that wouldn't be possible, as the label data is not assigned as part of the db query, where the where is applied, but after the data has been created.
For searching on "dropdown" labels you would need to use a database join element rendered as a dropdown.
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top