Home › Forums › WoodMart support forum › Switching pages of search results only works after second click
Switching pages of search results only works after second click
- This topic has 7 replies, 2 voices, and was last updated 3 years, 3 months ago by
Artem Temos.
-
AuthorPosts
-
November 18, 2021 at 8:20 am #332748
wildguitarsParticipantHello wonderful Woodmart support team, I hope you’re all doing well.
We have an issue on our website, which I believe has existed from the very beginning but we never solved it.
After performing a search and arriving at the search results page, clicking on the “next page” arrow at the bottom doesn’t switch to the second page, rather it reloads the first page again. Clicking on the “next page” arrow again takes you to the second page. The same thing happens on page 2, page 3, etc.
Please view the following screen recording:
https://drive.google.com/file/d/1YCAlp8nR2jJ51gfR2w3qZl6cW4GMGqwN/view?usp=sharingI consulted with our web developer and he wrote:
I re-checked this issue.
I see that when “AJAX Shop” is on
click respond in search & reload pagination after sometime,
but it should work in ajax way.
When I checked the console, it throws a log before refresh
https://prntscr.com/1zwj9yu (pjax error timeout, which indicates ajax failed).
When it’s off (AJAX Shop) search pagination click respond immediately.
I think they should consult this ajax issue with woodmart support to know the reason behind this error.I’d appreciate your assistance with this.
Thanks!
TomNovember 18, 2021 at 10:27 am #332802
Artem TemosKeymasterHello,
Our AJAX requests have a timeout of 5 seconds and if they don’t get a response from the server at this time the page will be loaded in a natural way. If you need, we can give you an instruction how to increase this time to 10 or 15 seconds but it is not a solution and you can try to disable this function completely.
Kind Regards
XtemosNovember 21, 2021 at 7:12 am #333423
wildguitarsParticipantHi Artem, thanks as always for your prompt reply. My developers are asking what would be the consequences of increasing the time to 10-15 seconds.
Best regards,
TomNovember 22, 2021 at 7:05 am #333561
Artem TemosKeymasterAdd this code to functions.php in your child theme. It is usually not recommended since your server response time should be 1-2 seconds max.
add_filter( 'woodmart_pjax_timeout', function(){ return 30000; } );
November 22, 2021 at 7:45 am #333571
wildguitarsParticipantHi Artem, thank you for the code.
As per my previous message, my developers are asking what would be the consequences/side effects of implementing this code.Best regards,
TomNovember 22, 2021 at 8:37 am #333587
Artem TemosKeymasterIt doesn’t have any side effects. But you need to investigate why your server response time is so slow instead.
November 22, 2021 at 9:00 am #333600
wildguitarsParticipantThank you for clarifying, I will pass on the information to my developers.
Best regards,
TomNovember 22, 2021 at 10:15 am #333616
Artem TemosKeymasterYou are welcome! Feel free to contact us if you have any further questions.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register