Summary: | Google API Loader jsapi called over http | ||
---|---|---|---|
Product: | Koha | Reporter: | Indranil Das Gupta <indradg> |
Component: | OPAC | Assignee: | Indranil Das Gupta <indradg> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | trivial | ||
Priority: | P3 | CC: | f.demians, julian.maurice, kyle |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | String patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 17103 - Google API Loader jsapi called over http
Bug 17103 - Google API Loader jsapi called over http Bug 17103 - Google API Loader jsapi called over http Bug 17103 - Google API Loader jsapi called over http [PASSED QA] Bug 17103 - Google API Loader jsapi called over http |
Description
Indranil Das Gupta
2016-08-10 19:27:33 UTC
Created attachment 54321 [details] [review] Bug 17103 - Google API Loader jsapi called over http This patch removes the hardcoded protocol ("http") from the URI, leaving the browser to negotiate the correct http/https context. Prevents MIXED CONTENT failure, allowing GoogleIndicTransliteration to function correctly when used in SSLized OPACs. Test plan --------- 1/ Make sure your OPAC is being served both over HTTP and HTTPS 2/ Set GoogleIndicTransliteration syspref to "Show" 3/ Access the OPAC over http, Google transliteration element will show up in masthead searchbox. 4/ Access the OPAC over https. The element will not show. Console will show MIXED CONTENT error and failure of google loader. 5/ Apply patch. Repeat steps #3 and #4 again. Now in both cases GoogleIndicTransliteration will work. Comment on attachment 54321 [details] [review] Bug 17103 - Google API Loader jsapi called over http Review of attachment 54321 [details] [review]: ----------------------------------------------------------------- ::: koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc @@ +209,4 @@ > </script> > [% END %] > [% IF ( GoogleIndicTransliteration ) %] > + <script type="text/javascript" src="//www.google.com/jsapi"></script> I was expecting https:// not just //. This should work, but only because google and/or your browser makes it work. Explicit is always best. Created attachment 54417 [details] [review] Bug 17103 - Google API Loader jsapi called over http This patch removes the hardcoded protocol ("http") from the URI, leaving the browser to negotiate the correct http/https context. Prevents MIXED CONTENT failure, allowing GoogleIndicTransliteration to function correctly when used in SSLized OPACs. Test plan --------- 1/ Make sure your OPAC is being served both over HTTP and HTTPS 2/ Set GoogleIndicTransliteration syspref to "Show" 3/ Access the OPAC over http, Google transliteration element will show up in masthead searchbox. 4/ Access the OPAC over https. The element will not show. Console will show MIXED CONTENT error and failure of google loader. 5/ Apply patch. Repeat steps #3 and #4 again. Now in both cases GoogleIndicTransliteration will work. Created attachment 54418 [details] [review] Bug 17103 - Google API Loader jsapi called over http This patch replaces the hardcoded protocol ("http") from the URI with https since that is what Google defacto uses to serve JS resources Prevents MIXED CONTENT failure, allowing GoogleIndicTransliteration to function correctly when used in SSLized OPACs. Test plan --------- 1/ Make sure your OPAC is being served both over HTTP and HTTPS 2/ Set GoogleIndicTransliteration syspref to "Show" 3/ Access the OPAC over http, Google transliteration element will show up in masthead searchbox. 4/ Access the OPAC over https. The element will not show. Console will show MIXED CONTENT error and failure of google loader. 5/ Apply patch. Repeat steps #3 and #4 again. Now in both cases GoogleIndicTransliteration will work. Created attachment 54420 [details] [review] Bug 17103 - Google API Loader jsapi called over http This patch replaces the hardcoded protocol ("http") from the URI with https since that is what Google defacto uses to serve JS resources Prevents MIXED CONTENT failure, allowing GoogleIndicTransliteration to function correctly when used in SSLized OPACs. Test plan --------- 1/ Make sure your OPAC is being served both over HTTP and HTTPS 2/ Set GoogleIndicTransliteration syspref to "Show" 3/ Access the OPAC over http, Google transliteration element will show up in masthead searchbox. 4/ Access the OPAC over https. The element will not show. Console will show MIXED CONTENT error and failure of google loader. 5/ Apply patch. Repeat steps #3 and #4 again. Now in both cases GoogleIndicTransliteration will work. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Created attachment 54427 [details] [review] [PASSED QA] Bug 17103 - Google API Loader jsapi called over http This patch replaces the hardcoded protocol ("http") from the URI with https since that is what Google defacto uses to serve JS resources Prevents MIXED CONTENT failure, allowing GoogleIndicTransliteration to function correctly when used in SSLized OPACs. Test plan --------- 1/ Make sure your OPAC is being served both over HTTP and HTTPS 2/ Set GoogleIndicTransliteration syspref to "Show" 3/ Access the OPAC over http, Google transliteration element will show up in masthead searchbox. 4/ Access the OPAC over https. The element will not show. Console will show MIXED CONTENT error and failure of google loader. 5/ Apply patch. Repeat steps #3 and #4 again. Now in both cases GoogleIndicTransliteration will work. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 16.11, thanks Indranil! Pushed in 16.05. Will be in 16.05.03. Pushed to 3.22.x, will be in 3.22.10 |