We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7045
    • 225 Posts
    Forgive me if this has already been covered or is in the wrong section. I get the following error in a popup whenever I launch the site I just updated to 1.0.1.

    AjaxSearch version obsolete. Empty your browser cache and check the version of AjaxSearch.js file


    I stripped down my call to the minimum, and I still get the error. I know it is something simple, but I can’t figure it out.

    Thanks in advance
      • 5811
      • 1,717 Posts
      Empty your browser cache to get the new version of the js script used by AjaxSearch
        • 7045
        • 225 Posts
        I wish it was that easy. I cleared and tested in 4 different browsers, no luck.
          • 5811
          • 1,717 Posts
          Ok. Two possibles reasons:
          1/ I don’t know why, but you don’t run the ajaxSearch 1.8.4 version. So check the version of your snippet. In the manager look at the code of the ajaxSearch snippet. Line 49 you should find:
          // ajaxSearch version being executed
          define('AS_VERSION', '1.8.4');
          
          // Path where ajaxSearch is installed
          define('AS_SPATH', 'assets/snippets/ajaxSearch/');


          2/ you don’t use the javascript of the assets/snippets/ajaxSearch/js folder of MODx1.0.1 but a folder of your previous MODx installation. So check the content of this js file: Look at the code of your html page. Open the ajaxSearch.js file linked with your page. And let me know the value of variable _version.
          You should get the following code:
          // AjaxSearch default snippet parameter values
          var _version = '1.8.4';
          ....
          
          function activateSearch() {
            if (as_version != _version) {
              alert("AjaxSearch version obsolete. Empty your browser cache and check the version of AjaxSearch.js file");
              return;
            }
          If you have updated your site with 1.0.1 you must have as_version = _version = ’1.8.4’
            • 7045
            • 225 Posts
            Thanks for taking the time, but everything is 1.8.4. I have no idea why this is happening.
              • 5811
              • 1,717 Posts
              but everything is 1.8.4.
              Probably not. Otherwise you don’t get this message.

              To be sure, with firefox use the firebug plugin and debug the js file to catch the version value provided by the php part of the snippet. Or if your site in production, send me by Personal Message, the url of your site, I will debug this for you.
                • 7045
                • 225 Posts
                Thanks for the generous offer, but I am an idiot. After wasting a ton of time jumping through hoops, I finally realized I forgot to empty the most important cache. After emptying it out for my firewall/router, it worked. Damn I am an idiot sometimes. embarrassed