Summary: | PlainMARC view broken on OPAC if other $.ajax calls produce errors | ||
---|---|---|---|
Product: | Koha | Reporter: | Lucas Gass (lukeg) <lucas> |
Component: | OPAC | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | mkstephens |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
19.11.00
|
|
Circulation function: | |||
Attachments: |
Bug 24084: PlainMARC view broken on OPAC if other $.ajax calls produce errors
Bug 24084: PlainMARC view broken on OPAC if other $.ajax calls produce errors Bug 24084: PlainMARC view broken on OPAC if other $.ajax calls produce errors |
Description
Lucas Gass (lukeg)
2019-11-21 18:17:35 UTC
Created attachment 95704 [details] [review] 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." Created attachment 95705 [details] [review] 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." Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 95749 [details] [review] 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." Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Nice work! Pushed to master for 19.11.00 |