WPIntell

Source evidence

Not compatible with "Use Google Libraries" plugin

Root Relative URLs · support · 2014-07-25T21:27:00+00:00

complaintsentiment
highseverity
1.0relevance
4replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

5 / 35 rows with source links

14.3% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

30 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
vletroye unresolved
Hi, When I enable this plugin, the url to jquery (inserted by “Use Google Libraries”) becomes src=’/ajax/libs/jquery/1.10.2/jquery.min.js?ver=1.10.2′ instead of src=’//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js’ It results in an error 404 and some features not working… I tried to add “http:” in front of the src url in the “Google Libraries” plugin without success. I tried to add various BlackList url in “Root Relative” (via Settings > General) without more success: – /ajax/libs/jquery – //ajax.googleapis.com – http://ajax.googleapis.com Any idea how to fix this ? https://wordpress.org/plugins/root-relative-urls/ I have a hacked version of this plugin on GitHub that includes the following changes. Fixed PHP error in wp_mail() function Do not run plugin on .xml sitemap requests PHP warning split() depricated Blacklist external JS files The hacks I have put in place are taken from some of the issues posted here. No guarantee it will help, but you’ll need to blacklist all the scripts that are loaded from google. Try them with and without the domain name, don’t remember at the moment which. https://github.com/Hube2/root-relative-urls Thx a lot! Out of the box, your hack doesn’t solve my issue… How should I type the urls in the blacklist ? I only want to prevent the rewriting of “//ajax.googleapis.com/ajax/libs/” V. The code that actually checks the url in the blacklist is: if (stripos($url, trim($x)) !== false) And it only compares the url without the domain name. You should be able to blacklist all of the google scripts by just including the common beginning portion, without the domain name: example: /ajax/libs/ Great !!! It works now fine ! I didn’t understand that it was nor checking on the domain name… Thx a lot!

Comments

4 shown
John Huebner 2014-07-26T03:14:00+00:00

I have a hacked version of this plugin on GitHub that includes the following changes. Fixed PHP error in wp_mail() function Do not run plugin on .xml sitemap requests PHP warning split() depricated Blacklist external JS files The hacks I have put in place are taken from some of the issues posted here. No guarantee it will help, but you’ll need to blacklist all the scripts that are loaded from google. Try them with and without the domain name, don’t remember at the moment which. https://github.com/Hube2/root-relative-urls

vletroye 2014-07-26T14:54:00+00:00

Thx a lot! Out of the box, your hack doesn’t solve my issue… How should I type the urls in the blacklist ? I only want to prevent the rewriting of “//ajax.googleapis.com/ajax/libs/” V.

John Huebner 2014-07-26T15:19:00+00:00

The code that actually checks the url in the blacklist is: if (stripos($url, trim($x)) !== false) And it only compares the url without the domain name. You should be able to blacklist all of the google scripts by just including the common beginning portion, without the domain name: example: /ajax/libs/

vletroye 2014-07-26T15:48:00+00:00

Great !!! It works now fine ! I didn’t understand that it was nor checking on the domain name… Thx a lot!