[Koha-bugs] [Bug 30689] Incorrect Babeltheque setting can cause console warning

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu May 5 13:25:49 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30689

--- Comment #1 from Owen Leonard <oleonard at myacpl.org> ---
Created attachment 134635
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134635&action=edit
Bug 30689: Incorrect Babeltheque setting can cause console warning

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."

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list