Text filter not working

  • Posts: 130
  • Thank you received: 1
9 years 10 months ago #185743

-- 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

Attachments:

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

  • Posts: 193
  • Thank you received: 76
9 years 10 months ago #185758

Ahoj,

it's a bug.
For quick fix in file administrator\components\com_hikashop\classes\filter.php on line 69
change

$value = $safeHtmlFilter->clean(@$formData['filter']['filter_data_text'], 'string');
to
$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.

  • Posts: 130
  • Thank you received: 1
9 years 10 months ago #185766

Hi,

It's fine after the fix.

Thanks,

Karol

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

  • Posts: 193
  • Thank you received: 76
9 years 10 months ago #185771

Glad it worked.

For devs:

$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: 9 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.

  • Posts: 1
  • Thank you received: 1
9 years 10 months ago #185902

Thanks, same issue with filter_currencies:

$filter->filter_options['currencies']=$safeHtmlFilter->clean(@$formData['filter']['filter_currencies'], 'string');

to this one:
$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.

  • Posts: 82866
  • Thank you received: 13373
  • MODERATOR
9 years 10 months ago #185932

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.

  • Posts: 193
  • Thank you received: 76
9 years 10 months ago #185940

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.

  • Posts: 82866
  • Thank you received: 13373
  • MODERATOR
9 years 10 months ago #185947

Yes. Thanks. It's updated.

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

  • Posts: 108
  • Thank you received: 1
9 years 8 months ago #193766

Hi,

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

Thank you

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
9 years 8 months ago #193805

Hi,

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

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

  • Posts: 108
  • Thank you received: 1
9 years 8 months ago #193936

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.

  • Posts: 82866
  • Thank you received: 13373
  • MODERATOR
9 years 8 months ago #193957

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.

  • Posts: 108
  • Thank you received: 1
9 years 8 months ago #194050

working great, thank you!

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

Time to create page: 0.118 seconds
Powered by Kunena Forum