user991830
user991830

Reputation: 894

error - MooTools is not defined

Joomla 2.5 website:

212.113.141.98/~artstorm/

Getting error:

Uncaught ReferenceError: 
MooTools is not defined - mootools-more.js:13
Uncaught TypeError: Object [object global] has no method 'addEvent' - 212.113.141.98/~artstorm/:45

Even though mootools-more.js is defined in the source.

Any ideas?

Upvotes: 1

Views: 2712

Answers (1)

scraaappy
scraaappy

Reputation: 2886

You embed several jquery libraries, it's not recommended and not necessary. It looks like you disable mootools in joomla (with a plugin or in your php code) and add it manually in your code. You may remove this lines, enable mootools again, disable all embeds of jquery libraries from plug-ins, and just use the last version. If you need old function from jquery (for example "live" method wich is deprecated now) you can use the jquery migrate plugin. then the scripts embedded in your header should look like this :

 <script src="your_url/media/system/js/mootools-core.js" type="text/javascript"></script>
  <script src="your_url/media/system/js/core.js" type="text/javascript"></script>
  <script src="your_url/media/system/js/caption.js" type="text/javascript"></script>
  <script src="your_url/media/system/js/mootools-more.js" type="text/javascript"></script>
  <script src="your_url/media/system/js/modal.js" type="text/javascript"></script>

  ...

  <script src="your_url/libraries/jquery/jquery-1.9.1.min.js" type="text/javascript"></script>
  <script src="your_url/libraries/jquery/jquery-migrate-1.1.0.js" type="text/javascript"></script>
  <script>
  jQuery.noConflict();
  </script>

Upvotes: 2

Related Questions