First let me thank you all for making such an outstanding piece of software, everything I’ve set out to do, with the following single exception, I was able to implement easily the very first time I ever tried modx on this current install. I plan on using this more, and will probably release some snippets if they seem useful over time once I get a better feel for the system.
But this one I can’t figure out at all: ajax search stops working on live site
I uploaded the working prototype to live hoster, updated the db, debugged a few small issues, and the transfer was complete, except for ajaxsearch suddenly not working.
Site is developed on Debian sid, linux, Apache2.2, php5, mysql 5.0.51 local machine. Everything works great on development version, ajax search box (I used the same code, unaltered as comes with modxhost). The search results drop down, everything is perfect.
However, when I move the site to its server, FreeBSD with Apache2, php 5, mysql 5.0.41 -everything except ajax search works. Now and then, the search box will send me to the default search results page, but the drop down search results never work. And usually the standard search results page doesn’t work either. Clicking the ’search’ button does not have any result.
I’m assuming something may have gotten set in some config file on my local machine, and is still being used on the remote server version.
I have not changed or tweaked any defaults in the search, it’s the same code as out of the box modxhost re the ajaxsearch call, on live and remote.
Again, thanks for the great work, this software is done exactly how I would have wanted it done had I written it, it’s really pleasant to work with, hopefully I can get this little glitch with search working soon, client is already very happy with the prototype.
No error messages at all, that’s what’s so weird, the form is simply dead. I’ve never seen this before with a web form.
I’ll try the updated ajaxsearch as you recommend and post the results, but I suspect that it’s not going to do the trick, my guess is a problem in some permission or config somewhere, but we’ll see, I’m not familiar enough with this stuff to really give a better guess at this point.
I’ll post back when I have tested that suggestion.
-
☆ A M B ☆
- 24,524 Posts
It may be a database collation/charset type mismatch. Check your config.inc.php file to make sure the connection_charset matches your remote database. If the query is looking for the wrong charset, of course it would frequently not find anything, and may even be returning database errors that are not getting displayed.
Thanks, that sounds like exactly the type of issue I am looking for, I’ll check that and let you know, also for other users who might experience similar issues.
Both are set to use latin1, and both mysql dbs are using latin1 as their default. However, I suspect that this is the right track, but I’ll still have to try to update the ajaxsearch to see if that fixes it.
Hopefully I can get this resolved soon, I’d consider this a bug if it’s a config issue, and if the new ajaxsearch stuff fixes it, obviously the bug has been handled. I’ll let you know though.
Sorry for the delay, busy with other projects.
I installed 1.7, on my local machine, it works fine, same as 1.6, on remote server nothing.
The other major issue is that not only does the active ajax search not work, the search button fails to work as well unless I turn off javascript. If javascript is on, nothing at all happens, just dead.
So something is going in there for certain, but what that is remains unclear.
Also, turning ajaxSearch to 0, off, does nothing, unless javascript is off on the browser, nothing happens.
[!AjaxSearch? ajaxSearch=`0` &AS_landing=`8` &moreResultsPage=`8` &showMoreResults=`1` &addJscript=`0` &extract=`0` &AS_showResults=`0`!]
I double checked this on multiple browsers, msie 6, firefox, opera, and the search form is simply dead.
This would be nice to figure out, I’ll have to read the js to see if it’s failing to test for something, that’s my first guess.
I’m going to check the javascript etc and see if something else might be causing this issue.
thanks for the quick response, the & fixed the switch, but now the real mystery is why the ajax menus work on one platform and not the other.
Since search is now basically working again, I’ll need to check the code.
But why is mootools.js obfuscated? Doesn’t seem in keeping with the spirit of open source software to me.
Anyway, at least now client can see the search working, one step at a time, thanks..
Mootools was included in the page html, so that part is correct I assume.
-
☆ A M B ☆
- 24,524 Posts
It’s not "obfuscated" to hide the code, it’s just "compacted" to save bandwidth.