Jump to content

Uncaught TypeError: undefined is not a function


Recommended Posts

I get this error: Uncaught TypeError: undefined is not a function  in these 2 files

index.php:1067    $("#product_form").validate
admin-products.js:1204   $('#curPackItemName').select2({

 

The last thing I did before the failure occurred was to update to the latest version 1.06.09

This error prevents me from making modifications to the new items, allows me to enter the name of the article but little more in the following fields is blank screen with no option to add numbers, images or assign to a category

 

post-747663-0-15099700-1414148157_thumb.jpg

post-747663-0-73386300-1414148168_thumb.jpg

Link to comment
Share on other sites

  • 5 years later...

This is a common JavaScript error that happens when you try to call a function before it is defined. You get "'undefined' is not a function"  error when you try to execute a function that is uninitialized or improperly initialized . It means that the expression did not return a function object. So you have to figure out what you are trying to execute isn't a function.

 In Javascript , when you execute a function, it's evaluated like the following:

  •     expression.that('returns').aFunctionObject(); // js
  •     execute -> expression.that('returns').aFunctionObject // what the JS engine does

That expression may be complex. So when you get undefined is not a function it means that expression did not return a function object. So you have to figure out what you are trying to execute isn't a function.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...