Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Same Javascript error gets logged over and over again.
This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko 5 years, 2 months ago.
- AuthorPosts
- March 25, 2018 at 11:56 pm #17253
As soon as the page loads the following error gets constantly added to the Javascript console. It just keeps counting up into the thousands of errors.
jquery.js?ver=3.1.1:4 Uncaught TypeError: a.indexOf is not a function
at r.fn.init.r.fn.load (jquery.js?ver=3.1.1:4)
at jquery.ajaxsearchpro-noui-isotope.min.js?ver=ZHvU45:27Attachments:
You must be logged in to view attached files.March 26, 2018 at 8:39 am #17258Hi!
Can you please add temporary back-end and FTP details? I will have to check the error directly, as it is impossible to tell based on the error message only.
I am guessing, that either one of the files got corrupted, or there is something altering/changing the output of the search box, but it could be something else as well.
Thank you!
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 28, 2018 at 2:00 am #17326Unfortunately I only have it this installed on localhost. I can’t deploy it to my client’s site until it is working.
I found how to un-minify the JS for this plugin. I’ve attached screenshots showing the line in the plugin’s JS that is causing the error in jQuery. I also replaced the minified version of jQuery I am using to the development version so you can see the specific variables.
-
This reply was modified 5 years, 2 months ago by
chrisstiles.
Attachments:
You must be logged in to view attached files.March 28, 2018 at 10:43 am #17343Hi,
I see the problem now. You are using jQuery version 3+, while the WordPress built in version is 1.12.4 at the moment. The error is caused by a function call that is no longer supported from jQuery 3.
I strongly recommend sticking with the built in jQuery version, as most plugins are built/scripts are based on that.If you want to stick with 3, than that line will have to be modified slightly:
1. Make sure to change the script version to ‘Non minfied’ here: https://i.imgur.com/eeDQGCV.png
2. Then open up the wp-content\plugins\ajax-search-pro\js\nomin\asp_wrapper.js file on your server via FTP
3. Then scroll to line 231, which should be this:scope(window).load(function () {
4. Change that line to:
scope(window).on('load', function () {
5. Save the file, clear your browser cache and reload the page with CTRL + SHIFT + R.
This should get rid off the problem, however I am not sure if it causes any further problems.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 28, 2018 at 8:38 pm #17359Got it, thank you very much!
March 29, 2018 at 10:00 am #17365You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
-
This reply was modified 5 years, 2 months ago by
- AuthorPosts
You must be logged in to reply to this topic.