? Success

User tests: Successful: Unsuccessful:

avatar OctavianC
OctavianC
22 Jun 2015

Issue

While working on #7237 I noticed that you cannot specify relative protocol URIs (description here) when using JHtml() to load external scripts or stylesheets.

If you try to use something along the lines of:

JHtml::_('script', '//www.google.com/recaptcha/api.js');

The file will get ignored completely (it won't show up in the <head> section).

Solution

includeRelativeFiles() from the JHtml class seems to take into account external files only if they begin with http. Added another check for // and fixed the issue. Or added a new feature, whichever you prefer :)

avatar OctavianC OctavianC - open - 22 Jun 2015
avatar OctavianC OctavianC - change - 22 Jun 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 Jun 2015
Labels Added: ?
avatar Kubik-Rubik
Kubik-Rubik - comment - 22 Jun 2015

Good change, had the issue also in combination with a CDN service.

@OctavianC Please also update the comment above the changed line. Thanks!


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7238.

avatar Kubik-Rubik Kubik-Rubik - test_item - 22 Jun 2015 - Tested successfully
avatar OctavianC
OctavianC - comment - 22 Jun 2015

Done, no idea why Travis is failing though :(

avatar Kubik-Rubik
Kubik-Rubik - comment - 22 Jun 2015

Looks good for me now, Travis timed out in one of the processes (10 minutes no output).

avatar Bakual
Bakual - comment - 22 Jun 2015

Restarted the errored Travis jobs. Hopefully they will pass now.

avatar zero-24 zero-24 - change - 22 Jun 2015
Easy No Yes
avatar zero-24 zero-24 - change - 22 Jun 2015
Category Libraries
avatar OctavianC
OctavianC - comment - 22 Jun 2015

bump - Travis job seems ok.

avatar mbabker
mbabker - comment - 22 Jun 2015

This same fix is applied in #7184 already. Closing this as a duplicate since the other is already RTC.

avatar mbabker mbabker - change - 22 Jun 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-06-22 12:48:47
Closed_By mbabker
avatar mbabker mbabker - close - 22 Jun 2015

Add a Comment

Login with GitHub to post a comment