#12308 closed enhancement (fixed)
Ticketstats doesn't work when trac is loaded via https
Reported by: | Jorrit Schippers | Owned by: | Jorrit Schippers |
---|---|---|---|
Priority: | normal | Component: | TracTicketStatsPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 1.0 |
Description
The YUI library is loaded via http. In Chrome it is not allowed to reference Javascript resources on http while the website is loaded via https.
Unfortunately, the Yahoo CDN does not support https. I will attach a patch that changes the CDN from Yahoo to CDNJS. This requires some changes, because the path format used on CDNJS differs slightly from Yahoo's, as there is no build
component in the path. Also, I will add rstrip('/')
so users can append slashes to the yui_base_url
variable without causing problems.
This is a backwards incompatible change for anyone who is using the yui_base_url
configuration setting.
Attachments (1)
Change History (10)
Changed 10 years ago by
Attachment: | ticketstats-12308.patch added |
---|
comment:1 Changed 10 years ago by
comment:2 Changed 9 years ago by
YUI 2.x is no longer available from yui.yahooapis.com
last I checked (#11440). I'm fine with your patch if you've found CDNJS serves the files for YUI 2.9. Shall I go ahead and commit it?
comment:3 Changed 9 years ago by
Files like http://yui.yahooapis.com/2.9.0/build/yahoo-dom-event/yahoo-dom-event.js
seem to be reachable still. I don't think CDNJS will every take it down and with my patch it is possible to switch between the two, without the patch using CDNJS is not possible.
comment:4 Changed 9 years ago by
Status: | new → accepted |
---|
comment:5 Changed 9 years ago by
The patch seems to be fine and the resources load, however the flash player doesn't display anything for me before or after the patch. Could you add some details to #11440 about how you got it working, such as flash player version and browser?
comment:7 Changed 9 years ago by
Owner: | changed from Ryan J Ollos to Jorrit Schippers |
---|
comment:8 Changed 9 years ago by
I use Chrome and the cloudflare CDNJS host and the graph displays fine for me. Do you have errors in the console?
comment:9 Changed 9 years ago by
Thanks for the reply. It's working now, I just wasn't trying hard enough. I had the HTTPS-only extension enabled in the browser and forgot to test in incognito mode where the extension is disabled.
Hmm, I now read that there is such a thing as
https://yui-s.yahooapis.com/
, so the fix may be much simpler. In any case, I think it is better to make/build
part of theyui_base_url
setting because other CDN's don't seem to use it.