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

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #332748

    wildguitars
    Participant

    Hello 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=sharing

    I 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!
    Tom

    #332802

    Artem Temos
    Keymaster

    Hello,

    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
    Xtemos

    #333423

    wildguitars
    Participant

    Hi 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,
    Tom

    #333561

    Artem Temos
    Keymaster

    Add 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;
    } );
    #333571

    wildguitars
    Participant

    Hi 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,
    Tom

    #333587

    Artem Temos
    Keymaster

    It doesn’t have any side effects. But you need to investigate why your server response time is so slow instead.

    #333600

    wildguitars
    Participant

    Thank you for clarifying, I will pass on the information to my developers.

    Best regards,
    Tom

    #333616

    Artem Temos
    Keymaster

    You are welcome! Feel free to contact us if you have any further questions.

Viewing 8 posts - 1 through 8 (of 8 total)