The Google Chart on the Usage Statistics page (http://drupal.org/project/usage/drupal) doesn't display because the request URI is too large.
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | project_654392.patch | 3.81 KB | drewish |
| #14 | project_654392.patch | 3.81 KB | drewish |
| #13 | googlechart_simple.patch | 2.14 KB | BartVB |
| #10 | 654392-move-project-usage-to-flot.patch | 5.96 KB | damien tournoud |
Comments
Comment #1
dwwThis has nothing to do with the redesign per se. It's just a bug in project_usage.
Comment #2
bdragon commentedYup, noticed this. There's an open issue to not use google charts for this. #428680: Change usage stats to not use google charts
Comment #3
drewish commentedI'd actually argue that the bug is with the browser. Modern (read: newer than IE6) browsers have no problem with the long URLs.
Comment #4
drewish commentedHummm... just pulled up the img link in the browser and Google is throwing errors "Request-URI Too Large" which totally disagrees with the documented behavior: http://code.google.com/apis/chart/faq.html#url_length
Comment #5
drewish commentedI started a thread in their discussion group to see if we can get some feedback from Google: http://groups.google.com/group/google-chart-api/browse_thread/thread/b47...
Comment #6
bdragon commentedAlso, there's the option of switching to one of the more efficient encodings.
http://code.google.com/apis/chart/formats.html
Comment #7
damien tournoud commentedThe current image on http://drupal.org/project/usage/drupal generates an URL to Google Chart that is 2317 characters long, which is over the documented limitation of 2048 characters.
We need to migrate away from Google Chart. I see Flot as a very good alternative.
Comment #8
killes@www.drop.org commentedI've had reservations about flot rendering in the browser only (ie you can't download an image) but I now think that I could take a screenshot if I so badly need a jpg...
Comment #9
BartVB commentedThe more efficient encodings that bdragon mentions would solve this, with the simple encoding (62 distinct values) each datapoint would only need one character in the URL. At the URL he mentions they even provide an algorithm for scaling and encoding.
I could take a swing at this but that's a waste of effort if Project is going to move toward Flot or another alternative graphing solution.
Comment #10
damien tournoud commentedHere is a first implementation of flot-based graphs. This is based on, and requires, the flot module.
Edit: this patch is incompatible to the caching as implemented in project_usage.
Comment #11
dww@DamZ: please continue the flot patches and discussion at #428680: Change usage stats to not use google charts, not here. Thanks.
Comment #12
greggles@BartVB - based on the most recent comments here (and the lack of comments on 428680) I think the Google Charts based solution is likely to stay in use if someone provides a patch for it.
Comment #13
BartVB commentedChanged theme_project_usage_chart_by_release() to make it use Google Chart simple encoding. Trying to get some dummy data for project_usage into the database took more time than writing the patch :)
Obviously I haven't been able to extensively test this, it works with my test data though.
Comment #14
drewish commentedI found a couple of bugs in the patch in #13 and after spending a little time on it decided that it made sense to use the extended encoding so we get more granularity.
Comment #15
dwwThis looks reasonable. I'll try this out on a scratch site in a little bit. Commenting here to see if the test bot picks up these patches now that #774706: Automated tests for project module landed and I enabled the bot for testing Project's issue queue. ;)
Comment #16
dww(cool, test bot!) ;)
I sync'ed the {project_usage_week_project} and {project_usage_week_release} tables from d.o to d6.p.d.o and applied the patch. We're getting a chart again (yay) but there are no lines (boo):
http://d6.project.drupal.org/project/usage/drupal
Not exactly sure why. Let me know if I can do anything to help you debug this.
Thanks,
-Derek
Comment #17
drewish commenteddoh, stupid bug on my part. i'd switched the encoding format from simple to extended but didn't change the "s:" to "e:".
Comment #18
drewish commentedComment #19
dwwTested on d6.p.d.o, works great. Committed to HEAD. Thanks! Now just awaiting d.o deployment (we're just now rolling out a new deployment system based on bzr, and I don't have the energy tonight to start using the new system -- I'm not even sure if it's ready for use, yet).
Comment #20
dwwDeployed and working: http://drupal.org/project/usage/drupal
Comment #22
gregglesIt's broken again, but this isn't the place to fix it - #428680: Change usage stats to not use google charts is.