Google API loader js included in opac-bottom.inc is called over HTTP. This is setting off MIXED CONTENT error on OPACs served over SSL. Directly impacts GoogleIndicTransliteration syspref which stops working on SSLized OPACs. This syspref is used extensively across Indian libraries to perform searches in Indian languages. While the fix is trivial, non availability of the feature is a deal breaker. Patch follows.
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