Skip to main content

Text filter not working

11 years 10 months ago #185743 by karolko
-- url of the page with the problem -- : www.mephit.cz
-- HikaShop version -- : 2.3.5
-- Joomla version -- : 2.5.28
-- PHP version -- : 5.3.29

Hi,

1) I've configured my text search filter as per the attachment (note I actually wanted the filter to be set against product_name but upon save this gets overrided by array).

2) When I go any page where the filter is enabled say mephit.cz/cz/zbozi/category/165-rodinne and filter on any product name (such as Osadníci z Katanu) the product is not filtered.

Thanks,

Karol

Please Log in or Create an account to join the conversation.

11 years 10 months ago #185758 by korzo
Replied by korzo on topic Text filter not working
Ahoj,

it's a bug.
For quick fix in file administrator\components\com_hikashop\classes\filter.php on line 69
change
Code:
$value = $safeHtmlFilter->clean(@$formData['filter']['filter_data_text'], 'string');
to
Code:
$value = $safeHtmlFilter->clean(@$formData['filter']['filter_data_text'], '');

and let me know if it works.
The following user(s) said Thank You: nicolas, karolko

Please Log in or Create an account to join the conversation.

11 years 10 months ago #185766 by karolko
Replied by karolko on topic Text filter not working
Hi,

It's fine after the fix.

Thanks,

Karol

Please Log in or Create an account to join the conversation.

11 years 10 months ago - 11 years 10 months ago #185771 by korzo
Replied by korzo on topic Text filter not working
Glad it worked.

For devs:
Code:
$formData['filter']['filter_data_text']
is either array or null(if no column was selected).
Calling JFilterInput::clean() with second parameter as empty string will hit default case in switch statement, iterate array and evaluate every value as string.
Last edit: 11 years 10 months ago by korzo.
The following user(s) said Thank You: Xavier

Please Log in or Create an account to join the conversation.

11 years 10 months ago #185902 by ooffick
Replied by ooffick on topic Text filter not working
Thanks, same issue with filter_currencies:
Code:
$filter->filter_options['currencies']=$safeHtmlFilter->clean(@$formData['filter']['filter_currencies'], 'string');

to this one:
Code:
$filter->filter_options['currencies']=$safeHtmlFilter->clean(@$formData['filter']['filter_currencies'], '');
The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

11 years 10 months ago #185932 by nicolas
Replied by nicolas on topic Text filter not working
Hi,

Thank you for the feedback guys.
Patches are applied on our end and the install packages now contain them.

Please Log in or Create an account to join the conversation.

11 years 10 months ago #185940 by korzo
Replied by korzo on topic Text filter not working
Same issue with Sort on line 212.
I think that's all for this method, other values are strings/integers.

Please Log in or Create an account to join the conversation.

11 years 10 months ago #185947 by nicolas
Replied by nicolas on topic Text filter not working
Yes. Thanks. It's updated.

Please Log in or Create an account to join the conversation.

11 years 8 months ago #193766 by shoppist
Replied by shoppist on topic Text filter not working
Hi,

The text filter on my end is returning no results.
pls see the config in the attached files.

Thank you

Please Log in or Create an account to join the conversation.

11 years 8 months ago #193805 by Xavier
Replied by Xavier on topic Text filter not working
Hi,

Please use another value for the "Search processing" option.

Please Log in or Create an account to join the conversation.

11 years 8 months ago #193936 by shoppist
Replied by shoppist on topic Text filter not working
Hi,

I tried each one of the options and neither made any change, I just got no results.
The main purpose of this text is to look for a specific product code.

any suggestions?

thank you.

Please Log in or Create an account to join the conversation.

11 years 8 months ago #193957 by nicolas
Replied by nicolas on topic Text filter not working
Hi,

The issue is with the menu settings, not the filter. The "sub element filter" option should be set to "all sub elements" and the "recently viewed" option should be deactivated.
The following user(s) said Thank You: shoppist

Please Log in or Create an account to join the conversation.

11 years 8 months ago #194050 by shoppist
Replied by shoppist on topic Text filter not working
working great, thank you!

Please Log in or Create an account to join the conversation.

Time to create page: 0.084 seconds
Powered by Kunena Forum