You are here:  » Uncaught TypeError: e.indexOf is not a function


Uncaught TypeError: e.indexOf is not a function

Submitted by Marcos on Sun, 2018-10-07 18:14 in

Hi there,

I'm trying a new install using the latest version of Pricetapestry (18/06A) and I'm getting 2 issues.

First one is that I'm getting the following error "Uncaught TypeError: e.indexOf is not a function". I didn't do any modifications to the original files and I fond this information regarding it:
"This error might be caused by jquery event aliases like .load, .unload or .error deprecated since jQuery 1.8. Look for these aliases in your code and replace them with .on() to register listeners instead. Example:

$(window).load(function(){...});

becomes:

$(window).on('load', function(){ ...});"

(https://stackoverflow.com/questions/38871753/uncaught-typeerror-a-indexof-is-not-a-function-error-when-opening-new-foundat#). I tried to do the suggested changes but I can't solve it. I guess I'm doing something wrong... Could you please give me any advise?

The second issue regards the Amazon Asynchronous Amazon and eBay API Modules. I did the changes but nothing happens when I click on the Amazon tab. Besides, the API seems to work because it properly shows Amazon results when I directly load the "searchresults_amazon.php" with a query.

Maybe the 2 problems are linked?

Thank you in advance.

Best,
Marcos

Submitted by support on Mon, 2018-10-08 07:57

Hello Marcos,

Thanks for pointing that out, I think the issues are related and I will update the code in the Aysnc API modules to use the alternative open method.

In the mean time, if you revert html/vendor/jquery.min.js to the version included in the 16/10A distribution you should then not get the error and the API modules will work just fine...

Cheers,
David.
--
PriceTapestry.com

Submitted by Marcos on Mon, 2018-10-08 16:17

Hi David,

Thank you for your quick answer. I replaced the file with the previous version as suggested and it solved both issues.

Thanks!
Marcos