Search function breaks after a no results query

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Search function breaks after a no results query

This topic contains 6 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 3 weeks, 6 days ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #40811
    jayjay57
    jayjay57
    Participant

    Hey,

    First off I love your plugin so far, it’s worked perfectly except for one issue. If a user makes a search on my website which returns no results, the search will just stop working and be stuck on the loading icon.

    You can try it out yourself to see what I mean: if you visit https://easywithai.com and search for something completely random, after you get no results it only works again a page refresh.

    Do you have any ideas how I could fix this? Sorry if this is outside of the support for the plugin, I’ve searched quite a bit and can’t seem to find anything that might fix this or give me a lead on what’s causing it! I’m not great at coding but I can use WordPress and Elementor quite well, and I know how to add functions and custom css, etc, if any of that might be able to fix it.

    I’m using Ajax Search Pro with the Elementor posts widget and use infinite scroll for my pagination, this problem doesn’t happen if I change the pagination to “Next/previous” so it must be something to do with the infinite scroll I’m guessing. I’d really like to use infinite scroll on my site so if there is a fix it would be great. If not, I guess I will have to just change the pagination.

    Thanks so much for your time and great plugin!

    Kind regards,
    Jay

    #40812
    jayjay57
    jayjay57
    Participant

    Hi,

    I think I have caught the error log using Chrome inspector:

    Uncaught TypeError: Cannot set properties of null (setting ‘innerHTML’)
    at Object.fixElementorLoadMoreResults (asp-eb889fb7.js:211:94)
    at asp-eb889fb7.js:44:269
    at Array.forEach (<anonymous>)
    at asp-eb889fb7.js:44:236
    at Array.forEach (<anonymous>)
    at a.applyFilters (asp-eb889fb7.js:44:214)
    at q (asp-eb889fb7.js:176:252)
    at asp-eb889fb7.js:180:406
    at window.WPD.intervalUntilExecute (asp-eb889fb7.js:45:308)
    at Object.liveLoad (asp-eb889fb7.js:180:374)
    fixElementorLoadMoreResults @ asp-eb889fb7.js:211
    (anonymous) @ asp-eb889fb7.js:44
    (anonymous) @ asp-eb889fb7.js:44
    a.applyFilters @ asp-eb889fb7.js:44
    q @ asp-eb889fb7.js:176
    (anonymous) @ asp-eb889fb7.js:180
    window.WPD.intervalUntilExecute @ asp-eb889fb7.js:45
    liveLoad @ asp-eb889fb7.js:180
    search @ asp-eb889fb7.js:92
    (anonymous) @ asp-eb889fb7.js:130
    setTimeout (async)
    (anonymous) @ asp-eb889fb7.js:130

    I hope this might give you some more info about the problem and possible fix.

    Thank you!

    #40820
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thank you for the details!

    The issue seems to be the one you have copy/pasted here. The plugin tries to resolve the “load more results” feature from the elementor posts widget, but it fails at some point during an existence check code.
    For now, you can very likely resolve this by turning off the elementor widget infinite loader to a pagination instead. It is generally recommended, it has a much better compatibility. The infinite loader is very hard to handle.

    I will debug through this issue on a local server, and will try to figure it out for the upcoming release.

    Best,
    Ernest Marcinko

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


    #40827
    jayjay57
    jayjay57
    Participant

    Hi Ernest,

    Thank you very much for your response! I think for now I will just change the infinite loading to pagination in that case, I have noticed it tends to complicate almost everything, haha. If you’re able to fix it in a future release that would be amazing, I tried for hours to find a fix but it does seem pretty difficult. No worries if you’re unable to fix it, I’ll also let you know if I manage to find any solutions.

    Thanks for your time with this!

    Kindest regards,
    Jay

    #40828
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Okay 🙂 I will definitely look into this for the upcoming release.

    Best,
    Ernest Marcinko

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


    #40865
    jayjay57
    jayjay57
    Participant

    Hey Ernest,

    Thank you for pushing the update to the plugin! It appears to have fixed the issue 🙂 If I set a spinner/loading icon in elementor infinite scroll settings it causes it to break again, but as soon I disable the loading icon it’s all working. Definitely not a big deal anyway, functionality wise it works perfectly now!

    Thanks so much for helping me with this issue.

    Kind regards,
    Jay

    #40866
    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 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.