We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8619
    • 229 Posts
    Strange error upon upgrade to 0.9.6 !

    I have just successfully (?) completed an upgrade from 0.9.5 to 0.9.6 and while testing everything to get a couple of bugs out, I found the following error when attempting to use AjaxSearch:

    Warning: main(/my/account/data/path/on/the/server/htdocs///assets/snippetsassets/snippets/AjaxSearch/AjaxSearch.php) [function.main]: failed to open stream: No such file or directory in /data/12/1/136/35/1136687/user/1207121/htdocs/index-ajax.php on line 29

    Warning: main() [function.include]: Failed opening ’/my/account/data/path/on/the/server/htdocs///assets/snippetsassets/snippets/AjaxSearch/AjaxSearch.php’ for inclusion (include_path=’.:/usr/services/vux/lib/php’) in /data/12/1/136/35/1136687/user/1207121/htdocs/index-ajax.php on line 29

    It looks like it is searching for the snippet but not finding it, not sure where to look to begin to fix this, can anyone help here?

    I have a static ajaxSearch call with the results on the same page, snippet call is:

    [!AjaxSearch? &ajaxMax=`10` &extract=`1`!]

    You can see it on the site live:

    http://www.unionky911.org

    Thanks in advance!
      • 19840
      • 1 Posts
      I am having trouble with AjaxSearch. If I log in as a webuser and do a search I get the following error:

      "malformed URI sequence" in AJaxSearch.js (Line 140).

      If I’m not logged in, everything works fine.

      Any ideas?

      Thanks,
      Mark
        • 52
        • 17 Posts
        Hello,
        Great plug in, its working really well apart from 1 slight problem that i can’t find out why is happening.

        When i do a search from a page, which then follows through to the result page, some of the results have an extract but others don’t. I can’t figure out why the others don’t have an extract. When i compare the pages with and without an extract they are the same, as they are all built from the same template.

        In firebug i can see the <p(ara)> tags where the extract should be, but there is no content in there. I have attached an image to illustrate.

        Any help would be much appreciated!
          • 52
          • 17 Posts
          Isn’t that typical, as soon as you post in the forum you figure out what the problem is.

          For anyone having the same problem, it was because the actual search term wasn’t included in the content. So say i search for "beer", as it was in the title that was displayed. "beer" wasn’t in the page content so no extract was displayed.

          Hope this helps someone!
            • 8619
            • 229 Posts
            Hey all!

            I’m still getting the following error after a .9.5 to .9.6 upgrade.

            Warning: main(/data/12/1/136/35/1136687/user/1207121/htdocs///assets/snippetsassets/snippets/AjaxSearch/AjaxSearch.php) [function.main]: failed to open stream: No such file or directory in /data/12/1/136/35/1136687/user/1207121/htdocs/index-ajax.php on line 29

            Warning: main() [function.include]: Failed opening ’/data/12/1/136/35/1136687/user/1207121/htdocs///assets/snippetsassets/snippets/AjaxSearch/AjaxSearch.php’ for inclusion (include_path=’.:/usr/services/vux/lib/php’) in /data/12/1/136/35/1136687/user/1207121/htdocs/index-ajax.php on line 29

            I have re-uploaded the AjaxSearch snippet and still same error. Can anyone help here?
              • 25483
              • 741 Posts
              I can’t get it working with friendly urls. The site is configured to use friendly urls and the landing page has a alias name.
              It does work ON the resultspage, but not in de box you get with the on-the-fly searching, all that links are with index.php?id=blabla

              I use this snippetcall:
              [!AjaxSearch? ajaxSearch=`1` &AS_landing=`71` &moreResultsPage=`71` &showMoreResults=`1` &ajaxSearchType=`1` &addJscript=`0` &extract=`0` &AS_showResults=`0`!]
              


              Did I forget something to get friendly urls working with ajax search?
                with regards,

                Ronald Lokers
                'Front-end developer' @ h2o Media

                • 36527
                • 120 Posts
                Hi Guys,

                Is there anyway in the snippets current guise NOT to highlight items in ’navigation menus’ where a keyword in the search appears.

                It would be good to highlight what is only contained in a documents content.

                Also the search results are bringing back content with images included - then these images are not being brought across, just a placeholder.

                TIA
                  • 7231
                  • 4,205 Posts
                  That is a good question, I had the same issue and pocked around but it was beyond what I could figure out. It sure looks ugly when my navigation gets highlighted.
                    [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                    Something is happening here, but you don&#39;t know what it is.
                    Do you, Mr. Jones? - [bob dylan]
                    • 20056
                    • 7 Posts
                    Hi,

                    Can I define a section of my site that AjaxSearch will search? For example if I only want to search in documents that are contained under document A and B?

                    Thanks!
                      • 27708 MODX Staff
                      • 2,502 Posts
                      Ajax Search Worked fine on Development Server now won’t work on Production server.

                      Dev Server:
                      WAMP (XAMPP)
                      PHP:5.2.1
                      Apache 2.X
                      MySQL 5.0.33
                      MODx 0.9.6

                      Production Server:
                      LAMP
                      PHP 4.4.7
                      Apache 1.3.37
                      MySQL 4.1.22
                      MODx 0.9.6

                      I have been using this dev to production environment scenario for nearly a year and probably 5 sites using MODx where I do a local dev and migrate.

                      My problem is that AjaxSearch won’t return results on the production server:

                      http://smashingredhost.com/~northque/

                      I have tried the following:
                      Friendly URLS off/on
                      Calling snippet Cached/uncached with document cached and uncached always clearing the cache and including clearing the cache in my browsers (Fx 2.0.07 and IE7).
                      I have reinstalled the snippet.
                      Tried with paramters.
                      Tried &ajaxSearch=`0`
                      I tried with .htaccess (fURLS) and set the basepath for the site \~northque\ and \~northque (without the trailing) as well with .htaccess renamed to ht.access to see if it was a path issue.
                      I tried with zlib off and on (php.ini as server is running php as CGI app)

                      I am not sure what else I need to check. I don’t know if there is any compatibility issues between the various PHP and MySQL versions (could this have to do with it?)

                      Any suggestions are appreciated.

                      I am going to reupload mootools.js and the AjaxSearch files to see if it makes a difference. The thing is that I am just not getting results at all. Please help.

                      My call as it stands is in the template as follows [[AjaxSearch]]. If you need more, let me know.

                      Cheers,

                      Jay
                        Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub

                      This discussion is closed to further replies. Keep calm and carry on.