Juuser

JUncaught TypeError: Can't call method on undefined

Recommended Posts

Hi, 

Trying out the FusionCharts and managed to render a bar chart nicely. But on the page where the chart is loaded, I get the following error:

fusioncharts.js:13 Uncaught TypeError: Can't call method on undefined
    at e.exports (fusioncharts.js:13)
    at e.exports (fusioncharts.js:13)
    at Function.e.exports (fusioncharts.js:13)
    at HTMLDocument.fireEvent (mootools-core.js?0782601e4e69d358b8933909645cf550:120)
    at HTMLDocument.j (mootools-core.js?0782601e4e69d358b8933909645cf550:175)

This breaks other javascript on that page.

fusioncharts.js:13 takes to:

            if (e == undefined)
                throw TypeError("Can't call method on " + e);  <-ERROR ROW
            return e

mootools-core.js?0782601e4e69d358b8933909645cf550:120 to:

       fireEvent: function(a, b, d) {
            var e = this.retrieve("events");
            if (!e || !e[a])
                return this;
            b = Array.from(b);  <-ERROR ROW
            e[a].keys.each(function(a) {
                d ? a.delay(d, this,  : a.apply(this, 
            }, this);
            return this
        },

and mootools-core.js?0782601e4e69d358b8933909645cf550:formatted:4397 to:

      if (!c) {
            Browser.loaded = c = true;
            a.removeListener("DOMContentLoaded", j).removeListener("readystatechange", m);
            a.fireEvent("domready");  <-ERROR ROW
            b.fireEvent("domready")
        }

 

Fusioncharts is the latest trial downloaded today.

Do you have any ideas how to solve this?

Thanks in advance :)

 

 

Edited by Juuser

Share this post


Link to post
Share on other sites

Hi,

The error seems to be happening because of caching, please reload the page clearing the browser cache, or check the page in incognito mode and share your observations.

Thanks,

Ayan

Share this post


Link to post
Share on other sites

Hello Ayan,

Thanks for the reply. Unfortunately this doesn't seem to be the cause.  I tried with incognito mode and with different browsers, still the same error across all browsers.

I have tried rendering the chart in Joomla module position and articles, all have the same issue.

BR,

Martin

Share this post


Link to post
Share on other sites

Thanks for the reply! 

Actually I'm not using Fusioncharts Joomla plugin. I have included php-wrapper "fusioncharts.php" and fusioncharts.js in the template and then tried to render the chart in Joomla standard "custom" module and also including the separate php-file where the chart code is. 

The chart displays fine, but there is always this javascript conflict no matter how I include the chart. So it seems as log as the chart is rendered in Joomla framework, the error occurs.

Thanks in advance for any advice that could solve the issue!

Edited by Juuser

Share this post


Link to post
Share on other sites

Thanks, this example works without errors when run independently. But when I include this sample e.g. in Joomla module, the same error still occurs. So there seems to be a conflict with Joomla framework (mootools maybe?)

Share this post


Link to post
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