Forum Replies Created
-
AuthorPosts
-
February 5, 2025 at 1:46 pm in reply to: Ajax search result vary with WordPress search result. #52756
Ernest Marcinko
KeymasterHi!
Thank you for the details, it helps a lot!
Do you happen to have any other search plugin active by any chance? In almost every case this is caused by having two search plugins active and overriding each others results.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterMy mistake, I was looking at the wrong debug window.
The issue is related to the modal container. If you notice, the close (X) button is immediately focused when the search is finished. If I remove that close X button, then the keyboard does not close. I suspect there is something in the modal script that auto-focuses the close button, causing the keyboard close. It is not coming from the search plugin unfortunately, and I couldn’t find which script it is. It could be a mutation observer code, those are extremely hard to debug.
Ernest Marcinko
KeymasterHi,
Thanks for the details.
The issue is unrelated to the plugin, there is a custom coded event listener attached to all ajax request, so when the search is finished it triggers and removes focus from the input, which causes the keyboard to hide.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterI tried to replicate this to make sure it’s not a bug of some sort, but everything is okay on my end, so it’s probably something along the configuration.
Can you please add temporary back-end details so I can check the search config? It’s probably something I’m not thinking of.
Ernest Marcinko
KeymasterAll right! Let me know, it is not fully documented yet as it was very recently changed.
Ernest Marcinko
KeymasterHi,
If the class does not exist, that may indicate that you might be trying to access it before the plugin is loaded.
It was indeed moved to a different file in the most recent patch:
wp-content/plugins/ajax-search-pro/src/server/Query/SearchQuery.php
However the ASP_Query class alias is autoloaded, that should still work.If for some reason it does not, then please use the namespace variation
new WPDRMS\ASP\Query\SearchQuery();I will update the documentation in a minute with the correct path and namespace. Thanks for letting me know!
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterWithin 14 days for sure. Hoping to drop it sooner.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterNo, that should do it, but I suspect there is probably more into it, but at this point I don’t exactly know what.
Either way, this is going to be resolved very soon with the 4.27 release, as we are integrating an advanced field to the description field – so no custom code will be needed after that 🙂
-
AuthorPosts