Custom filters no longer works - Error in hikashop.js

  • Posts: 148
  • Thank you received: 21
  • Hikashop Business
1 year 5 months ago #346194

Hi,

I noticed a problem I didn't have before with the filters:
As soon as I check a box, I get a Javascript error and they don't work like before (it blocks a few times, when I uncheck it doesn't reset, etc.).
I have the same problem locally or on the online sites.
What I find strange is that I'm (nearly) sure it worked before.

The error in question :



I also have another error that I find on one of my online copies of the site that I use especially when I need outside help. It is therefore less up to date and everything is not necessarily well configured:

I don't know if this helps with the other error. But as this error is only present here, I don't necessarily need to correct it because it is not present elsewhere.

I specify that I use version 4.6.1 of Hikashop.
I have to upgrade to 4.6.2 afterwards, but I still have to do some testing.

Thanks in advance for your help.

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

  • Posts: 81511
  • Thank you received: 13066
  • MODERATOR
1 year 5 months ago #346195

Hi,

1. The issue with the filters likely comes from an old view override which hasn't been updated. Rename temporarily the folder templates/YOUR_TEMPLATE/html/com_hikashop/product/ via FTP and clear your website/browser caches and it should then hopefully work, confirming it comes from one of the view override files in that folder. So then, rename the files in the folder one by one to identify the one causing the issue.
Then, you might need to redo the modifications you had done to that view with a new view override, based on the latest version of the view file to get back the look as you had it before.

2. This error must come from a third party extension (module, plugin or template) as there is no blockCookies function in HikaShop.
I would guess it comes from a system plugin for cookies but without being able to look at the issue directly, it's hard to say. If you could provide a link to the page with the error, I could have a look.

The following user(s) said Thank You: FDBI

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

  • Posts: 148
  • Thank you received: 21
  • Hikashop Business
1 year 5 months ago #346223

Hi,

Thanks for these informations.

1 (and 2?). I did several tests to try to isolate the problem, but without success.
- I have selected the 'Default' view of the product and saved (backend)
- Cache emptied (backend and browser + use of incognito mode)
- I renamed my file 'templates/{TEMPLATE}/html' to 'templates/{TEMPLATE}/html_t'
(Because renamed 'com_hikashop/product' to 'com_hikashop/product_t' and 'com_hikashop' to 'com_hikashop_t' had no effect).

This message contains confidential information

if i check/uncheck several times on a checkbox :
As long as I don't accept the cookie I get an error : 'Uncaught TypeError: can't redefine non-configurable property "cookie"'
And sometimes : 'Uncaught TypeError: resp is null'

If I accept the cookie the error linked to the cookie disappears but the second error stay.

EDIT : For information, I use CookieHint for my cookie

Last edit: 1 year 5 months ago by FDBI.

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

  • Posts: 81511
  • Thank you received: 13066
  • MODERATOR
1 year 5 months ago #346224

Hi,

I checked your link but I don't see any javascript error and the filters are working fine as far as I can see.
I suppose you don't see any change because of some caching on your end.
And thus it would confirm that the issue is with the view overrides in your template.

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

  • Posts: 148
  • Thank you received: 21
  • Hikashop Business
1 year 5 months ago #346227

It's very strange because on our side there are several of us who have the problem.
It doesn't always work the first time, but after a few attempts we get stuck.

In fact, we've just noticed that it might be related to the 'OSpam a not' extension.
When we deactivate it everything seems to be back to normal.
It was set to a fairly high value (5s), so probably a false positive.
I think that when you have checked/unchecked too quickly it might be this extension that blocks everything.
Even the choice of the number of products to display is monitored and can block the page (except that in this case, we have the warning message indicating that it is because we are too fast).
I think the extension will unfortunately limit us too much (even if we set it to 1s, a checkbox that can be clicked quickly).
It would have been nice to be able to limit it on some forms.

Last edit: 1 year 5 months ago by FDBI.

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

  • Posts: 81511
  • Thank you received: 13066
  • MODERATOR
1 year 5 months ago #346229

Indeed, if the OSpam extension blocks the filtering because it's too fast, then it would be good to be able to have a way to whitelist some areas in the extension settings.
Unfortunately, that's not something we can do on our end. I would recommend contacting the developer of the extension and let them know about this use case and proposal of new setting.

The following user(s) said Thank You: FDBI

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

  • Posts: 148
  • Thank you received: 21
  • Hikashop Business
1 year 5 months ago #346238

Yes, I will contact them.
If I get any useful feedback, I'll try to forward it here to you.

For the moment I have left empty the field 'Minimum Form Time'. Therefore, the 'Honey Pot' system stays active.

Thank you for your help !

Last edit: 1 year 5 months ago by FDBI.
The following user(s) said Thank You: nicolas

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

Time to create page: 0.061 seconds
Powered by Kunena Forum