Issues with embeding using mootools 1.11

widgetsjs
mootools

#1

Hello,

we are having some issues on embeding pictures (media files) on our website. Website uses mootools 1.11 but embeding a tweet with picture causes the following error:

Uncaught TypeError: Cannot read property 'call' of
undefinedr @ widgets.js:2r @ widgets.js:2i @ widgets.js:3(anonymous function) @
widgets.js:2(anonymous function) @ widgets.js:2r @ widgets.js:2o @ widgets.js:2a
@ widgets.js:2(anonymous function) @ widgets.js:2r @
widgets.js:2Function.bind.test.window.__twttr.window.__twttr.widgets.window.__twttr.widgets.init.79.s.addEventListener.s.addEventListener.o
@ widgets.js:2

Error is resoulting this:

If mootols are disabled on webpage embeding works fine - disabling them is not a option.
Any solutions?


#2

The version of MooTools you mentioned, 1.11, was released on June 4, 2007. Upgrading to a more modern version of MooTools with the 1.2 compatibility wrapper removed should solve the issue.

MooTools overrides interfaces used in modern browsers in versions compiled with the compat flag. Using a nocompat version of MooTools should maintain compatibility with modern browsers and Twitter’s widgets JavaScript.

The relevant code in the MooTools:

Use a version of MooTools with the compat layer build option left unchecked.
http://mootools.net/core/builder

If you use a hosted version on a CDN look for nocompat in the filename to indicate the JavaScript was compiled without the compatibility flag enabled.


#3