2

Having trouble fixing the errors that come up in the console.

enter image description here

js.js shows me this:

Validation.addAllThese([
['validate-custom', ' ', function(v,elm) {
    return elm.validate();
}]

]);

form.js takes me to this piece of code:

this.validator  = new Validation(this.form);

and prototype.js showes me following:

function klass() {
  this.initialize.apply(this, arguments);
}

however when I click on index error it shows me the newsletter subscription form:

var newsletterSubscriberFormDetail = new VarienForm('newsletter-validate-detail');

It does look like there is the problem with subscription form and indeed when I remove it error is not showing up, but I'm having trouble fixing it.

My jQuery is the first that loads and then its followed by all other js libs. Currently I don't have noConflict implemented and not sure if that could be the problem, but I've tried many different ways of adding noConflict and it still didnt solve the issue.

Can someone please advise what could this error be related to? Thanks in advance guys!

2

The error you are seeing is indicating that the Validation class in JavaScript has not been defined yet. Is the file js/prototype/validation.js included on the page in question? Is the JavaScript initializing the newsletter form being executed before the inclusion of the validation.js file?

| improve this answer | |
  • thank you very much, it solved the problem. for some reason validation.js was included in page xml but in local xml it was set to removeItem js: <action method="removeItem"><type>js</type><name>prototype/validation.js</name></action> Thanks again! – lvekua Apr 15 '17 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.