Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Search does not work unless page is fully loaded first
This topic contains 13 replies, has 2 voices, and was last updated by Ernest Marcinko 1 year, 6 months ago.
- AuthorPosts
- August 16, 2021 at 1:49 am #34278
I am seeing very intermittent issues with our search box at the top of the broadwaypodcastnetwork.com. It is “website top search” (id 6). It seems that if anyone starts typing in the search bar before the page is 100% loaded, it does not work. Then a page refresh is needed and sometimes it doesn’t even work the second time.
How can we ensure that no matter when a user starts typing that the search will produce results?
Thanks in advance of your help!
August 16, 2021 at 10:12 am #34279Hi!
The issue is caused by the script deferring. I noticed on the page source, that all of the scripts are loaded as “deferred”, except some of the ajax search pro scripts. If you are using WP Rocket or similar cache optimization plugins, make sure not to exclude the plugin files from the defer process.
Best,
Also, usually excluding jquery from the deferred scripts helps with any compatibility issues, but it should not be neccessary.
You can also try this compatibility switch, if nothing else works: https://i.imgur.com/7pw4sjS.png
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
August 24, 2021 at 8:43 pm #34362Thank you! I seem to have been able to get the search itself working again — but now no featured images show for me next to search results. What do you suggest?
Attachments:
You must be logged in to view attached files.August 25, 2021 at 12:14 pm #34373It looks like you have an issue with your .htaccess file or your mod_rewrite configuration on your server.
Best,
If you try to access the WordPress ajax handler on your server, it should print a blank white page with a 0 or -1 printed to it. However note, that it can not be reached. This file should be publicly accessible, as WordPress does use it for background processes, as well as plugins for ajax requests.
Usually it is due to a permalink misconfiguration, or a cache plugin related misconfiguration in the the server .htaccess file, or something with a firewall.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
August 30, 2021 at 12:37 am #34404When I visit that link I actually get the blank page with the 0 printed… but still no images in the search results. Thoughts?
August 30, 2021 at 9:43 am #34409I am getting a 403 error still, with a blank page nothing printed to it.
Best,
I checked the request source, and it seems to be a firewall blocking the requests based on the response: https://i.imgur.com/fnZgvEI.png
For me it shows a geolocation restriction, but it can be different for other IP addresses.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
August 30, 2021 at 2:45 pm #34418What is your IP? Let me whitelist you so you can effectively troubleshoot.
August 31, 2021 at 6:43 am #34433You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
August 31, 2021 at 2:44 pm #34446Ok, try now!
August 31, 2021 at 5:52 pm #34450Thanks, that worked!
It was the lazy image loading script not working correctly. I updated the plugin to the latest release (it is not released yet), to test if that resolve it – and it did 🙂
Best,
It should be all right now.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
August 31, 2021 at 5:53 pm #34451Wonderful, thank you! Would you mind doing that on staging.broadwaypodcastnetwork.com as well? We are doing a big home page redesign and I don’t want to lose your changes when we push the staging site into prod.
August 31, 2021 at 5:59 pm #34452Sure, done 🙂
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
August 31, 2021 at 6:59 pm #34453YOU DA BEST
September 1, 2021 at 7:46 am #34459You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.