News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Various js issues on my site

Started by bunglehaze, February 15, 2018, 18:03:10 PM

Previous topic - Next topic

bunglehaze

Hey, I have almost got my new site setup for content using VM and am now going through settings, scripts  and errors for the shop functionality. I am getting a number of errors:

Seems to be the line for : colonel-booms:36 Uncaught TypeError: window.addEvent is not a function
if(typeof Virtuemart==="undefined"){var Virtuemart={};}var vmSiteurl='https://www.colonelboom.co.uk/';Virtuemart.vmSiteurl=vmSiteurl;var vmLang='&lang=en';Virtuemart.vmLang=vmLang;var vmLangTag='en';Virtuemart.vmLangTag=vmLangTag;var Itemid='&Itemid=217';Virtuemart.addtocart_popup="1";var usefancy=true;var sessMin=15;var vmAliveUrl="index.php?option=com_virtuemart&view=virtuemart&task=keepalive";var maxlps="4";var minlps="1";var sp_preloader='0';var sp_offanimation='drarkplus';window.addEvent("domready",function(){Element.prototype.hide=function(){}});


I am getting a recurring vmkeepalive.js error that just keeps going until it then turns into insufficient resources error and crashes the site.
keep alive 3448 newTime 0.2412 < NaN
console.log('keep alive '+kAlive+' newTime '+((newTime-lastUpd)/60000)+' < '+(sessMin*(parseFloat(maxlps) + 0.99)));

GET https://www.colonelboom.co.uk/big-zero/big-zero-banana-custard-pudding?_=1518713901675 net::ERR_INSUFFICIENT_RESOURCES
keeps coming up for jquery.min.js

I have disabled my compressions on js and css to try and work through this but essentially my image popup and ajax stop working, add to cart doesn't work as expect etc

Until now I have not had any issues with items loading so I am confused where this has suddenly started coming from, any ideas please?

VM is latest version - template is FLEX, again latest version and VM 3.2.12 ready. I have tried this on php 5.6, 7.0 and 7.1 with the same effect too

If I change a few things around and clear cache it will often let me add something to cart or will work normally. If I then go back to a product it's when it starts to error. sessions set to database or PHP have the same effect

Studio 42

window.addEvent("domready",function(){Element.prototype.hide=function(){}});

window.addEvent is a mootools script, this is obselete in Joomla 3 and have nothing to do with Virtuemart itself.
You should check with your template developer, so it remove this(and perhaps other) obsolete script.

bunglehaze

Would that also be causing the session error and resources spiralling? The template itself has a remove mootools option so my guess is something else is creating that error.

Studio 42

You have to remove mootols and nay script using mottols.
But you have some other issue as the CSS for add to cart.
Check with Aplikko.com, so they update the code.