Search does not work unless page is fully loaded first

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 Ernest Marcinko 1 year ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #34278
    alan_bpn92
    alan_bpn92
    Participant

    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!

    #34279
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    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.
    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

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #34362
    alan_bpn92
    alan_bpn92
    Participant

    Thank 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.
    #34373
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    It looks like you have an issue with your .htaccess file or your mod_rewrite configuration on your server.
    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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #34404
    alan_bpn92
    alan_bpn92
    Participant

    When I visit that link I actually get the blank page with the 0 printed… but still no images in the search results. Thoughts?

    #34409
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    I am getting a 403 error still, with a blank page nothing printed to it.
    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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #34418
    alan_bpn92
    alan_bpn92
    Participant

    What is your IP? Let me whitelist you so you can effectively troubleshoot.

    #34433
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #34446
    alan_bpn92
    alan_bpn92
    Participant

    Ok, try now!

    #34450
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Thanks, 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 🙂
    It should be all right now.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #34451
    alan_bpn92
    alan_bpn92
    Participant

    Wonderful, 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.

    #34452
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Sure, done 🙂

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #34453
    alan_bpn92
    alan_bpn92
    Participant

    YOU DA BEST

    #34459
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.