-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Charts disappeared #28
Comments
This is ringing a bell... did you open another issue recently about a chart not showing up? My first guess is that it's a caching issue. Did you just dial up page caching? |
I brought it up on Slack, but didn't make an issue. Caching is my thought too, but I don't know what to do about it... can't turn off the caching. |
@bondjimbond only thing I can think of, and it's just a guess, is that at the moment the cache was built, there was a glitch in downloading the Chart.js javascript file from cloudfare. If that is true (and I have absolutely no idea if it is), I wonder if using a local copy, as described in #6, would help reduce the risk of it happening again. |
That could work! |
@bondjimbond do you want me to work on #7 to see if that helps? |
Yes, sorry #6 |
@bondjimbond looks like to use a local copy of Chart.js, you need to build it with npm or Bower (https://www.chartjs.org/docs/latest/getting-started/installation.html). It's not a single file JavaScript library. Do you still want to try this option? |
Sure... Is there a way maybe for the module to first check if a local copy is installed, and then if not try for the remotely hosted copy? |
@bondjimbond can you try this?
I'm entirely sure this will work, since I can't get either npm or bower to install Chart.js (untrusted certificate error). But it should. |
Error when loading:
|
In the module code the URL to the Chart library is marked as 'external', which according to https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_add_js/7.x should not be aggregated. Yet the filename in the 404 error you are seeing suggests it is being aggregated. Can you confirm that the URL to Chart.bundle.js as defined in step 4 above is correct? Test it by copying it and then visiting it in a private window. |
On my dev VM, using the URL http://localhost:8000/sites/all/libraries/chartjs/Chart.bundle.js and with Javascipt aggregation enabled, charts are working for me. I'm not getting the 404 error you are seeing. Let me know if your URL is correct and we'll take it from there. |
Whoops, made a mistake in my wget apparently. Yep, it's working now! |
Very good. I've documented this over at #6 and will update the readme accordingly. |
Not sure why, but charts are not showing, and there are no errors reported.
See https://dc.arcabc.ca/islandora/object/dc%3Aroot -- the "Usage Statistics" dropdown appears at the bottom of the page, and expands as well, but no actual content appears. Nothing is revealed in the console.
Tried changing the JQuery version, no effect.
Even weirder -- the dropdown appears when logged out, but disappears when logged in.
Any ideas what could be happening?
The text was updated successfully, but these errors were encountered: