- Posts: 141
- Thank you received: 3
problem with filters reset
-- Joomla version -- : 3.9.13
-- PHP version -- : 7.2.14
Hi, I have problem with proper functioning of filters – In fact with filters reset either using Reset Button or using mark “x” for deletable filters. I thought that the problem might be caused by the URL length as discussed on this Forum Thread and I have implemented proposed change in media/com_hikashop/js/hikashop.js – so URL address after filters are set looks like that
Then after I use Reset Button filters are reset and full product listing is presented but filters in the Hikashop Filter Module are still presented as they were set (I am attaching an image).
I checked message in Console and it looks like below (no error message is reported in everything.php file from System Debug):
I have no customization in filter.php. This problem also occur using Prostar Template.
I would like to ask for help in solving this problem.
Regards,
Greg
Please Log in or Create an account to join the conversation.
Could you provide a link to the shop so that we could reproduce the issue in order to first better understand the situation ?
Please Log in or Create an account to join the conversation.
Regards,
Greg
Please Log in or Create an account to join the conversation.
But unfortunately when we process our tests everything works as expected, there may be something missing in your step by step.
In order to help you, can you precise :
- Your browser to process your test
- If you are logged or not
- If you are logged, does the account you provide to us, have the same properties same yours ?
- Other points that can help us.
Awaiting your returns to progress on your subject.
Regards
Please Log in or Create an account to join the conversation.
Browser: Mozilla Firefox 71 (but it should be also possible to reproduced on Google Chrome 78)
User: Not logged
Scenario
- Set Filter: Category: Travel
- Click on Filter Button
- Click on Reset Button
- Go to Page 2 (pagination toolbar)
- Set Filter: Category: Travel
- Click on Filter Button
- Click on Reset Button
- product listing is reset but filter (in this case Category) in Hikashop Filter Module are still showing as set
Additionally I found another problem with functioning of filters - problem is related with wrong presentation of filters after product page visiting - please find below two scenarios how to reproduce this problem
Browser: Mozilla Firefox 71
User: Not logged
Scenario A
- Set Filter: Category: Travel
- Click on Filter Button
- Go to Page 2 (pagination toolbar)
- Click on Reset Button (in consequence all filters are clean)
- Click on any Product Image to open Product Page (for example first image on the left - first row)
- Click on back button on browser navigation to back from Product Page to Product Listing page
- After returning to the Product Listing Page, instead of empty filters, we see filters that have been reseted before going to the product page
Scenario B
- Set Filter: Category: Travel
- Click on Filter Button
- Go to Page 2 (pagination toolbar)
- Click on Reset Button (in consequence all filters are clean)
- Go again to Page 2 (pagination toolbar)
- Set Filter: Category: Travel
- Click on Filter Button
- Click on any Product Image to open Product Page (for example first image on the left - first row)
- Click on back button on browser navigation to back from Product Page to Product Listing page
- After returning to the Product Listing Page, filters are not set (as they were presented before going to the product page) - we see all filters clean (reset)
Regards,
Greg
Please Log in or Create an account to join the conversation.
Regards,
Greg
Please Log in or Create an account to join the conversation.
sorry for pressing but I haven’t received feedback for a long time and I am worried if this topic is still being analyzed on your side, especially because it is a very important matter for me
Regards,
Greg
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Philip and Nicolas have actually analyzed it but they will be in winter holidays until the January so they won't be able to debug it until then.
I'll try to reproduce and debug it as soon as possible !
Kind regards,
Mohamed.
Please Log in or Create an account to join the conversation.
I will be waiting for a solution
Regards,
Greg
Please Log in or Create an account to join the conversation.
Regards,
Greg
Please Log in or Create an account to join the conversation.
Sorry for the delay. It was a rough start of the year with a lot of support to handle.
I finally had the time to look into the issue today, however I must be missing something because I'm not able to reproduce it.
I went to serwer1910203 DOT home DOT pl/test/en/shop/product-listing (I put the URL just to make sure that we're talking about the same website) with Google Chrome (I also tried with FireFox with the same result)
Then, I set the filter "people" to "group_of_people"
Then, I click on the "filter" button
Then, I go to the second page
Then, I click on the "reset" button
And I correctly get the first page of all the products and the filter is reset in the filter module.
So I'm not sure if you still have a problem ?
However, regarding your "Scenario A" and "Scenario B", I was able to reproduce the issue. However, these have been fixed in HikaShop 4.2.2 with a modification to media/com_hikashop/js/hikashop.js
I checked the version of your HikaShop and it seems that you have the 4.2.2. However, if I check the version of your media/com_hikashop/js/hikashop.js I can see that it says it's the 4.2.1 version and it doesn't have the patch I was talking about above.
So to me, you need to make sure that this file is replaced with the one of the 4.2.2 and it should work:
monosnap.com/file/ktCKr1HdJbHY52xT5D0r6aXaqQQSik
To do that, you could rename that file via FTP (or delete it) and then install the HikaShop 4.2.2 install package that you can download on our website. That will it will add again the file with the latest version.
Alternatively, you can extract the install package on your local computer and replace the file via the FTP. It is located in the media/js/ folder in the install package.
Please Log in or Create an account to join the conversation.
- Set Filter: Category: Travel
- Click on Filter Button
- Click on Reset Button
- Go to Page 2 (pagination toolbar)
- Set Filter: Category: Travel
- Click on Filter Button
- Click on Reset Button
- product listing is reset but filter (in this case Category) in Hikashop Filter Module are still showing as set
I have uploaded again hikashop 4.2.2 and after installation hikashop.js is in the ver. 4.2.2. and problem presented in Scenario A and B is not exist.
However problem with filter reset still exist.
Regards,
Greg
Please Log in or Create an account to join the conversation.
Ok, I was able to get the problem on your website now.
Looking at the situation, I can see that the AJAX request sent to the server to refresh the filter module gets back a 500 error message:
monosnap.com/file/XHb5YE2WZ1lf2vKvTw46bMUnHfjHcx
So because of that, the filter area is not refreshed and thus you still see the filters set.
I don't know why you get that.
Could you check the PHP error log of your server ?
It should contain a "fatal error" message corresponding to that 500 error which should help us understand what is going on.
Please Log in or Create an account to join the conversation.
I have asked my server provider for checking PHP error logs and I will be back with this information to you.
Regards,
Greg
Please Log in or Create an account to join the conversation.
I got your message but what you gave is the apache access log, not the PHP error log and thus it doesn't provide much information on the issues besides the fact that there was a 500 HTTP error status returned (which we already knew from replicating the issue on your website).
So yes, we'll definitely need the PHP error log to get the real error message behind the issue and understand what is going on.
Please Log in or Create an account to join the conversation.
a) errors.log file doesn’t contain any error information
b) they checked that only in Google Chrome in the Console is information indicated error 500 but for example on Firefox there is no information regarding error 500 (however filters doesn’t reset also in Firefox)
c) based on above in their opinion problem is generated between application and browsers and is not related with the server
Regards,
Greg
Please Log in or Create an account to join the conversation.
Regards,
Greg
Please Log in or Create an account to join the conversation.
I'm not sure what you mean. There is no such line of code on line 111.
So maybe you also have an old version of the file administrator/components/com_hikashop/classes/filter.php
Similarily, check the version of that file near the beginning. If it's not 4.2.2 then you probably have an old version.
Please Log in or Create an account to join the conversation.
Regards,
Greg
Please Log in or Create an account to join the conversation.
Ah ok, I see. I was looking at another file.
Removing that file from product / filter.php basically deactivates the ajax on the filter system.
Since you have them along with the products on a full page, deactivating the ajax is fine as it won't change much speed wise. And it will circumvent the issue you have with the ajax request for the refresh of the filter module area returning a 500 error.
So that can indeed be a viable solution for you.
Please Log in or Create an account to join the conversation.