[Koha-bugs] [Bug 24084] PlainMARC view broken on OPAC if other $.ajax calls produce errors

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Nov 21 19:29:01 CET 2019


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

--- Comment #1 from Owen Leonard <oleonard at myacpl.org> ---
Created attachment 95704
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95704&action=edit
Bug 24084: PlainMARC view broken on OPAC if other $.ajax calls produce errors

This patch removes the use of jQuery's ajaxSetup() and load() to get the
"plain" MARC view and replaces it with $.get(). This allows for
error-handling on this specific AJAX request rather than all on the
page.

To test, apply the patch and view a bibliographic record in the OPAC.

 - Click the "MARC view" tab.
 - Click the "view plain" link.
  - The plain-text MARC view should load.
  - Clicking "view labeled" should return you to the original view.

To test error handling, edit opac-MARCdetail.tt line 185 and add a typo
to the URL, e.g. "opac-showmark.pl." Repeat the above steps. Clicking
the "view plain" link should trigger an error message: "Sorry, plain
view is temporarily unavailable."

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


More information about the Koha-bugs mailing list