I need to add a LinkedIn widget (so called Company Insider Plugin) on a page which relies on Mootools, but it seems to be causing a confict in JSON encoder implementation.
The error happening is Uncaught TypeError: Object #<Object> has no method 'encode'
happening in the following Mootools code when LinkedIn script is executed:
Native.implement([Hash, Array, String, Number], {
toJSON: function(){
return JSON.encode(this);
}
});
I tried "resetting" the conflicting entity as advised but with no effect (but that's probably an advice for a different kind of conflict).
What else can I do? There is no critical Mootools code after the LinkedIn one on the page so if I could 'disable' Mootools in a way for that script to work that'd be still fine.
Resolved via iframing the Linked snippet I needed.
Doesn't answer the question but solves the problem.