• Hi! I thought Ajax Search Lite would be the perfect solution to my need to search for keywords in team member profiles and exclude blog posts, but it just isn’t working, it won’t search on enter or clicking on the search icon, despite settings. I cleared the cache, I deleted another search plug in and cleared the cache again, still nothing. Help? The site I’m using it on is ManhattanAlternative.com.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author wpdreams

    (@wpdreams)

    Hi!

    Thanks for the details, I believe I know why it’s not working there.

    I’ve checked the javascript error console when opening the site, and there are two runtime errors, preventing further script execution: https://i.imgur.com/7Jwfppb.png

    Both errors come from the jquery.equalHeight.js script (line 43 in both cases), which is located in the theme directory, so I guess it’s part of your current theme.
    Looks like it’s triggering whenever the window is resized. Solving this issue will most likely fix the search as well.

    There is however a secondary ‘scoped’ script built into ajax search lite, which might help you bypass this problem, and still load the search:

    1. Open up the Compatibility Settings submenu under Ajax Search Lite menu
    2. Change the JavaScript source option to ‘Minified scoped‘, like so: https://i.imgur.com/rbZmP7t.png
    3. Save the options and try re-loading the page. Make sure to clear your cache, and reload by hitting CTRL + R in your browser.

    This may help, but it won’t get rid off the original problem coming from the theme script. I still recommend checking that as well.

    I hope this helps!

    Thread Starter dapitagora

    (@dapitagora)

    Thank you, changing the compatibility settings helped! I can now run the searches, however it’s not returning the correct results. I have it set in sources & basics/general options to search in custom post types (team), and in frontend options to exclude blog posts, but it’s doing the opposite, only returning results from blog posts and none from team.

    I will confess that I didn’t address your first comment about the script in the theme directory, because I’m not sure what else that will change. Do you think this is causing the above problem or is there a different fix in settings?

    Thanks again so much for your help!

    Alex

    Plugin Author wpdreams

    (@wpdreams)

    Hi Alex,

    I’m seeing team results on my screen only, the request seems to be all right as well: https://i.imgur.com/6lEFTzn.png

    Make sure to refresh your page and the cache as well if you change the settings. The front-end options might be cached as well, so it could explain the difference.

    About the script: It’s definitely causing the problem, as the search would not work otherwise. Unfortunately changing an option won’t help in this case, as there is a programatical error in that file.

    You should contact the theme author for to look into it. But, since the file is small, I looked into it, made a local copy and added a few lines to try preventing the issue. Here is the fixed source: https://gist.githubusercontent.com/anag0/f71572f3a523eee95b940e1fab19e736/raw/ced594679f8700480ebd47e8a137084fc5305290/jquery.equalHeight.js

    Before you do anything, make a back-up of your site!
    Then open the wp-content/themes/organic_collective/js/jquery.equalHeight.js file on your server (via FTP) and replace it’s contents with the contents on the link above. Clear the site cache, browser cache, and let’s hope it fixes the original issue.

    I honestly don’t know if that’s the correct way of fixing that issue, but it’s worth a try.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Ajax Search Lite 4.7 not working with WP 4.7.1’ is closed to new replies.