We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22704
    • 42 Posts
    Hi,

    A 1.02 to 1.03 upgrade issue perhaps rather than ajaxsearch specific.

    I’m getting this error -
    AjaxSearch version obsolete. Empty your browser cache and check the version of AjaxSearch.js file

    looking at the source I’m at 1.8.5 but the Manager still thinks I’ve got 1.8.4.

    This forum post - http://modxcms.com/forums/index.php/topic,41411.0.html suggests that the cache needs to be emptied. Tried it on Safari/FF but no improvement. And that perhaps the Route cache needs to be emptied - no idea how to do that.

    So I just manually updated the Snippet in the Manager using the code from assets\snippets\ajaxSearch\snippet.ajaxSearch.txt. The problem has gone away. Perhaps my earlier multiple attempts at Upgrading created some confusion (I had a few problems with STRICT_TRANS_TABLES) but this seems unlikely.

    Oddly this same error cropped up in this video
    http://codingpad.maryspad.com/2009/09/20/how-to-update-a-website-from-modx-0-9-6-3-to-modx-1-0-0/ at 15:30. Yet Install indicated Ajaxsearch had been upgraded successfully 14:00. This suggests the Install process may not really indicate if a Snippet has been fully Upgraded.

    I assume this is only going to affect Manager users if it is a cache problem? But in my case it looks like the Snippet Element wasn’t updated with the new updated code.

    Any views?

    Parthian
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Make sure that the snippet code is the latest; you may need to copy/paste it from the assets/snippets/ajaxSearch/snippet.ajaxSearch.txt file. Change the description to reflect the change in version as well.

      Or upgrade the whole thing http://modxcms.com/forums/index.php/topic,47938.msg282168/
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 22704
        • 42 Posts
        Thanks Susan,

        Yes that’s what I did. Copied the code and changed the description to 1.8.5 (easy to miss that bit).

        I’m more puzzled by why it happened and why the installer says something has been upgraded when it hasn’t. Presumably the Updated flag gets set when the files are deemed to be different or maybe when the files get copied over. Ideally the snippets etc should only get an Updated message when the files are copied and the Manager Snippet code has been successfully updated.

        I think it is likely that other snippets may not have the ’Obsolete’ test code. In which case it could be possible to run with outdated versions of code.

        I think this thread is more for the people who write the Install code.

        Cheers
        Parthian