Errors while testing the dashboard example on a Joomla site (when logged in)...

76 views
Skip to first unread message

T-Roy

unread,
Mar 29, 2012, 4:40:20 PM3/29/12
to Google Visualization API
Hello,

I duplicated the dashboard javascript code provided here:

http://code.google.com/apis/chart/interactive/docs/gallery/controls.html

within a Joomla article as an experiment and had no problems,
except...

...except after I logged into the joomla site. Now two error messages
are shown when viewing the Joomla article:

1. Gender Selection Filter visualization error: "One or more
participants failed to draw()"

2. Table visualization error: "e[ld] is not a function"


I expect both errors are related to the same cause and cascade, and
I'm guessing there is a pretty simple explanation why the example
works when I'm not logged in.

Any ideas out there?

Kind thanks! T-Roy

asgallant

unread,
Mar 30, 2012, 10:02:43 AM3/30/12
to google-visua...@googlegroups.com
It works fine when you're not logged in, but throws errors when you are, correct?  I wonder if that could be a security issue.

In case it's not, can you post the code or a link to the page so I can take a look?

T-Roy

unread,
Mar 30, 2012, 12:59:30 PM3/30/12
to Google Visualization API
Yes, that is correct.

Since this is in a development environment, I will share a link with
you via direct email address provided in your profile.

Thanks for your interest!
> > Kind thanks! T-Roy- Hide quoted text -
>
> - Show quoted text -

ES

unread,
Mar 30, 2012, 6:04:38 PM3/30/12
to google-visua...@googlegroups.com
Hi, I have the same problem.
The only difference is that here doesn't matter if I'm logged or not: there is the same error..

I think the problem is in:

        // Define a table
        var tabella = new google.visualization.ChartWrapper({
          'chartType': 'Table',
          'containerId': 'tab2',
          'options': {
            'width': '300px'
          }
        });


because the error is written in the table div, and the controls and the PieChart are represented in the right way.

In Chrome the error is "e[jd] is not a function"
In Firefox the error is "Object [object Object] has no method 'draw'"

I use Joomla 2.5.

Could you help us?

Many thanks!
ES

T-Roy

unread,
Mar 31, 2012, 9:49:47 AM3/31/12
to Google Visualization API
Subsequently I have found that the code works when a registered user
logs in. I dont' think this is a bug with the google code, but rather
a conflict caused by javascript code that Joomla is adding to the
document.onload event. In my situation, javascript code is added when
anyone higher than a registered user logs in (Manager, Author,
Administrator, etc...). Now using firebug to track this down...

...btw, I can't believe how much js code is now attached to a page!

asgallant

unread,
Apr 2, 2012, 11:06:22 AM4/2/12
to google-visua...@googlegroups.com
I took a look at the link you sent me, and I'm stumped.  Scanning over the code, the only substantive difference I could identify between the logged in/logged out versions of the page was a snippet of mootools code (as you pointed out), but it works on elements that don't exist on your page, so it shouldn't be having any effect at all.  The page is throwing errors not related to the API, however, so perhaps resolving those will clear up this issue.

T-Roy

unread,
Apr 2, 2012, 2:11:29 PM4/2/12
to Google Visualization API
Thank you for looking - as I dove into the code I became stumped too.

Though, I'm not aware of the other errors you mention - pardon my lack
of knowledge, how do you view those???

I have embedded the google tools js refence in the head tag with the
javascript code functions since joomla expects that for well
formedness, but it did not have any effect on the outcome.

I will take this up with a Joomla coding forum which may shed light on
the issue.

Thanks again!
> > > - Show quoted text -- Hide quoted text -

asgallant

unread,
Apr 2, 2012, 4:16:11 PM4/2/12
to google-visua...@googlegroups.com
I saw them appear in the developer's console in Chrome.
Reply all
Reply to author
Forward
0 new messages