- This topic has 5 replies, 2 voices, and was last updated 6 years, 5 months ago by Ernest Marcinko.
-
AuthorPosts
-
March 25, 2018 at 11:56 pm #17253chrisstilesParticipant
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:27March 26, 2018 at 8:39 am #17258Ernest MarcinkoKeymasterHi!
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!
March 28, 2018 at 2:00 am #17326chrisstilesParticipantUnfortunately 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 6 years, 5 months ago by chrisstiles.
March 28, 2018 at 10:43 am #17343Ernest MarcinkoKeymasterHi,
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:[html]scope(window).load(function () {[/html]
4. Change that line to:
[html]scope(window).on(‘load’, function () {[/html]
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.
March 28, 2018 at 8:38 pm #17359chrisstilesParticipantGot it, thank you very much!
March 29, 2018 at 10:00 am #17365Ernest MarcinkoKeymasterYou cannot access this content.
-
AuthorPosts
- You must be logged in to reply to this topic.