Filter Not working In some areas

  • Posts: 296
  • Thank you received: 4
  • Hikashop Business
1 year 8 months ago #319043

-- url of the page with the problem -- : www.totalfootballdirect.com/teamwear-kits
-- HikaShop version -- : 4.2.3
-- Joomla version -- : 3.9
-- PHP version -- : 7.2

Hi,

This might part be reated to: www.hikashop.com/forum/filters-search/89...sh404sef.html#318927

When browsing to the page that I copied in "Url of the page with the problem" it seems you can select 1 tem on the filter and after that it stops working. Chrome reports this error:

Uncaught TypeError: Cannot read property 'newURL' of null
at hikashop.js?v=423:922
at XMLHttpRequest.xhr.onreadystatechange (hikashop.js?v=423:206)

Any ideas please?

Other areas of the site work ok - others dont

Many thanks.

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

  • Posts: 74630
  • Thank you received: 11515
  • MODERATOR
1 year 8 months ago #319120

Hi,

I would first recommend updating to HikaShop 4.3.0.
We've made a few patchs on the filter system since the 4.2.3 and you don't have all of them, including one on the pagination system and your issue is linked to the pagination system as the javascript error you get actually comes from the URL requested which is missing a ? before the limitstart parameter used for the pagination.
If you check the network tab of the developer tools of your browser when using filters, you can see these requests:
monosnap.com/file/J8l6NLiPq75NPlqVicANnaZWiJcmov
And you can see that the ? is missing before the text limitstart.
Because of that, the URL is not found by the SEF system, it returns an error page instead of calling HikaShop's filter system to return the correct data and then the js of the filter system gets an answer it doesn't understand and you get that javascript error.

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

  • Posts: 296
  • Thank you received: 4
  • Hikashop Business
1 year 8 months ago #319329

Hi - I updated to the latest version of hikashop and the issues are still the same. thanks.

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

  • Posts: 74630
  • Thank you received: 11515
  • MODERATOR
1 year 8 months ago #319337

Hi,

Then could you provide a FTP access so that we could do some debugging as we're not able to reproduce the problem on our own test website ?
You can use our contact form for that:
www.hikashop.com/support/contact-us.html
Make sure you include a link to this thread for reference in your message.

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

  • Posts: 74630
  • Thank you received: 11515
  • MODERATOR
1 year 8 months ago #319484

Hi,

I found the issue. It's a bug created by the setting "301 redirect from non-sef to sef URL" of sh404SEF. Turning off that setting fixes the problem.
That's because sh404SEF tries to SEF the AJAX refresh URL

https://www.totalfootballdirect.com/index.php?option=com_hikashop&ctrl=product&task=filter&tmpl=raw&filter=1&module_id=&cid=0&from_option=com_hikashop&from_ctrl=product&from_task=listing&from_itemid=109&limitstart=0&filter_Category_3=13&filter_Brands_1=+&filter_Colour_2=+&filter_gender_4=+&return_url=https%3A%2F%2Fwww.totalfootballdirect.com%2Fteamwear-kits%3Flimitstart%3D0%26filter_Category_3%3D13%26filter_Brands_1%3D%2B%26filter_Colour_2%3D%2B%26filter_gender_4%3D%2B
which contains itself a return_url parameter and doesn't do it properly resulting in a wrong URL which then breaks further AJAX refreshes.

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

  • Posts: 296
  • Thank you received: 4
  • Hikashop Business
1 year 8 months ago #319526

HI Nicolas,

Thank you for looking at this and providing the fix.

Many thanks :)

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

  • Posts: 12
  • Thank you received: 2
3 months 2 weeks ago #336234

The same problem occurred on my website
but this solution is not work for my site
After confirming this once
how to setting "301 redirect from non-sef to sef URL" of sh404SEF. Turning off that setting
thank you
i is disabale Search Engine Friendly URLs in my site
my site info
-- HikaShop version -- : 4.4.3
-- Joomla version -- : 3.8
-- PHP version -- : 7.4

Last edit: 3 months 2 weeks ago by clkuo.

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

  • Posts: 74630
  • Thank you received: 11515
  • MODERATOR
3 months 1 week ago #336246

Hi,

I've replied to you on the other thread:
www.hikashop.com/forum/filters-search/90...-my-site.html#336245

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

Time to create page: 0.050 seconds
Powered by Kunena Forum