Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#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


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)

ticketstats-12308.patch (6.1 KB) - added by Jorrit Schippers 7 years ago.

Download all attachments as: .zip

Change History (10)

Changed 7 years ago by Jorrit Schippers

Attachment: ticketstats-12308.patch added

comment:1 Changed 7 years ago by Jorrit Schippers

Hmm, I now read that there is such a thing as, so the fix may be much simpler. In any case, I think it is better to make /build part of the yui_base_url setting because other CDN's don't seem to use it.

comment:2 Changed 7 years ago by Ryan J Ollos

YUI 2.x is no longer available from 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 7 years ago by Jorrit Schippers

Files like 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 7 years ago by Ryan J Ollos

Status: newaccepted

comment:5 Changed 7 years ago by Ryan J Ollos

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:6 Changed 7 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

In 14702:

3.0.0dev: Default to protocol relative-path and use CDNJS. Fixes #12308.

Patch by jorrit.

comment:7 Changed 7 years ago by Ryan J Ollos

Owner: changed from Ryan J Ollos to Jorrit Schippers

comment:8 Changed 7 years ago by Jorrit Schippers

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 7 years ago by Ryan J Ollos

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.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Jorrit Schippers.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.