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

    I’m having some issues with the latest ajaxSearch snippet - it seems to me that the usage of "AjaxSearch" vs. "ajaxSearch" is not consistent anymore - e.g. I had to rename AjaxSearch.inc.php to ajaxSearch.inc.php.

    In order to make the script working I had to add the AS_landing parameter although it’s mentioned as "optional" in the readme file.

    last but not least, when following a link on the results page and then clicking on the "Back" button in IE7 I’m getting a "Webpage has expired" warning?

    Thank you in advance for your input
      • 5811
      • 1,717 Posts
      I’m having some issues with the latest ajaxSearch snippet - it seems to me that the usage of "AjaxSearch" vs. "ajaxSearch" is not consistent anymore - e.g. I had to rename AjaxSearch.inc.php to ajaxSearch.inc.php.

      In this new version, i have renamed all the file names, in order that they begin all with a minus letter :

      • snippet.ajaxSearch.php
      • ajaxSearch.php
      • includes/snippet.ajaxSearch.inc.php
      • includes/ajaxSearch.inc.php
      • includes/templates.inc.php

      In the snippet.ajaxSearch.php the call to the include file is line 70 as follow:
      include(AS_PATH.'includes/snippet.ajaxSearch.inc.php');
      And inside the folder includes the file snippet.ajaxSearch.inc.php exists.

      The others include calls are the followings :
      in ajaxSearch.php, line 20:
      define('AS_PATH' , MODX_BASE_PATH . 'assets/snippets/ajaxSearch/');

      and from line 59 to 64:
      // include templates and include files
      include_once AS_PATH . 'includes/ajaxSearch.inc.php';
      include AS_PATH . 'includes/templates.inc.php';
      
      // include default language file
      include AS_PATH . "lang/english.inc.php";
      So where is the trouble ?

      In order to make the script working I had to add the AS_landing parameter although it’s mentioned as "optional" in the readme file.

      The AS_landing page, isn’t optional if you use &ajaxSearch=0 and if you want your results on an another page.
      If you use [!AjaxSearch!] all the parameters are optionals, but in this case you use the Ajax mode (&ajaxSearch=1 by default)

      last but not least, when following a link on the results page and then clicking on the "Back" button in IE7 I’m getting a "Webpage has expired" warning?
      Let me some time, i will try to reproduce this possible issue, and i will give you my feedback about that.
        • 5811
        • 1,717 Posts
        And I forget it, but the name of your AjaxSearch folder, where is the snippet code source should be with the default installation named ajaxSearch. In the previous version this folder was named AjaxSearch.
        For standardization of snippet folder names, I renamed it too.