Bugzilla – Attachment 134944 Details for
Bug 30689
Incorrect Babeltheque setting can cause console warning
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30689: Incorrect Babeltheque setting can cause console warning
Bug-30689-Incorrect-Babeltheque-setting-can-cause-.patch (text/plain), 2.28 KB, created by
Katrin Fischer
on 2022-05-13 07:17:33 UTC
(
hide
)
Description:
Bug 30689: Incorrect Babeltheque setting can cause console warning
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2022-05-13 07:17:33 UTC
Size:
2.28 KB
patch
obsolete
>From 30e66fccb2c86a52a5df691ca41ddb77ec2e9380 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 5 May 2022 11:13:08 +0000 >Subject: [PATCH] Bug 30689: Incorrect Babeltheque setting can cause console > warning >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch adds an additional system preference check to the part of the >OPAC bibliographic detail template which conditionally loads Babelthèque >JavaScript. The script tag should not be output if there is no >Babeltheque_url_js setting to use. > >To test, apply the patch and search for "Babeltheque" in system >preferences. > > - Set "Babeltheque" to "Do" include information. > - Enter a path in the "Babeltheque_url_js" preference, e.g. > "https://www.example.com/example.js" It doesn't have to be a valid > Babeltheque URL. > - In the OPAC, view the bibliographic detail page for any title. If you > used a dummy URL for the js preference you should see an error in the > console about the file not being found. This confirms that the > template logic is working. If you used a working Babeltheque URL then > the corresponding content should load. > - Return to system preferences and remove the URL from the > "Babeltheque_url_js" preference. > - Return to the bibliographic detail page in the OPAC and confirm that > there is no warning in the console about "'src' attribute of <script> > element is empty." > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index f4fd827fa0..a39cd0a0c0 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1076,7 +1076,7 @@ > <script src="https://imageserver.ebscohost.com/novelistselect/ns2init.js"></script> > [% END %] > >- [% IF ( Babeltheque ) %] >+ [% IF ( Babeltheque && Babeltheque_url_js ) %] > <script src="[% Babeltheque_url_js | html %]"></script> > [% END %] > </div> <!-- / .row --> >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30689
:
134635
|
134773
| 134944