Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Search not working properly since WP updated to 4.5
This topic contains 2 replies, has 2 voices, and was last updated by Tio Trom 7 years, 5 months ago.
- AuthorPosts
- April 13, 2016 at 7:35 pm #8355
This is the page where the search form does not work properly – https://www.tvpmagazine.com/articles/
I am not comfortable though to send a FTP access since there are too many important files to access the root of the server and I can’t create a FTP user that can only access a certain folder. I hope you understand and I am always available to upload any files you want me to.
Thank you!
April 14, 2016 at 11:22 am #8358Hi!
I think I have found why fails to work, but the source of the problem is probably related to a theme javascript file. Let me explain.
The search has an event listener function bound to the window “scroll” event. This function does some calculations mostly. A similar function is bound to a window resize event, so it’s redundant. Either fails, the other one corrects.
After loading these event listeners, the plugin triggers the “scroll” and the “resize” events when initializing itself to perform the caltulations. Of course nothing stops other jquery plugins to bind other functions to these events, so when triggering the “scroll” event, other event listener functions are executed as well – which is no problem at all, this is how it supposed to work. However if there is an error in any of the executed event listener functions the execution terminates. This is exactly what happens.Basically as far as I was able to dig through the stack – the theme.js somewhere binds an event listener to the window scroll event. This function however has an error and triggers an error message. Ajax search pro also bounds it’s function to the “scroll” event listener and triggers it when initializing – causing the error coming from the other function to terminate the execution. It’s a rather complicated issue.
As a temporary solution I have disabled the srcoll trigger within the ajax search pro non-minified javascript file so the execution is not terminated immediately now. However the error coming from the theme.js is still there, and it’s thrown anytime you sroll the page.
I cannot pinpoint the exact line in that file as it’s unfortunately minified 🙁Check this video of the issue (unlisted): https://youtu.be/d6vbx8749ao
I’ve turned off the javascript merge and minification on the cache plugin. I suggest not turning it on until this is resolved.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
April 14, 2016 at 6:19 pm #8364Ok thank you very much for the detailed explanation. Based on your input we will try to solve it with our theme. It is very good that for now it works as it is. Thank you again!
- AuthorPosts
You must be logged in to reply to this topic.