WPSolr reload loop

  • webtools
    Participant
    1 year, 3 months ago #31799

    Hello we are experiencing and issue where it looks like autocomplete_solr.js v22.5 is reloading the page in a loop when a user clicks an anchor link on the page. You can see this by scrolling the page, it jumps back to the anchor link position. Also can view in console logs and see the XHR calls are being triggered by jquery and autocomplete_solr.js.
    Affected url: https://www.militaryonesource.mil/financial-legal/personal-finance/taking-care-of-people/#spouseemployment

    wpsolr
    Keymaster
    webtools
    Participant
    1 year, 3 months ago #31801

    Just read through the thread, is the solution still to manually add that code to autocomplete_solr.js?
    Is there not a fix in any of the releases?

    wpsolr
    Keymaster
    1 year, 3 months ago #31802

    No fix unfortunately.

    webtools
    Participant
    1 year, 3 months ago #31803

    In the thread there is a solution, but later you say you cannot implement it because it breaks other features…
    what other wpsolr features does it break? is it still a viable solution?

    wpsolr
    Keymaster
    1 year, 3 months ago #31806

    It broke the back button navigation.

    webtools
    Participant
    1 year, 2 months ago #31859

    Adding if (document.location.hash !== “”) return; to line 116 in the popstate eventlistener resolves the issue and does not cause an issue with the back button. Maybe this solution can be added to the plugin.

    wpsolr
    Keymaster
    1 year, 2 months ago #31860

    Thanks for the feedback. But our first tests show that the fix fails sometimes.

    For instance, with screen 2.2 template “My current theme with Ajax”
    1) Sort ascending on titles
    2) Sort descending on titles
    3) Use the navigator back button
    4) Here, titles are expected to be sorted with ascending order. But instead, the descending sort is still operational.

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

You must be logged in to reply to this topic.