[Bug 37252] New: Saving an authority record as MADS (XML) fails
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37252 Bug ID: 37252 Summary: Saving an authority record as MADS (XML) fails Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: MARC Authority data support Assignee: koha-bugs@lists.koha-community.org Reporter: phil@chetcolibrary.org QA Contact: testopia@bugs.koha-community.org Depends on: 37235 Until it has been pushed, you need the patch for bug 37235 to see this, since otherwise you're stopped by a CSRF-related error first. Steps to reproduce: 1. View details for an authority record, e.g. /cgi-bin/koha/authorities/detail.pl?authid=620 2. tail -f /var/log/koha/kohadev/plack-intranet-error.log 3. In the authority details page, Save - MADS (XML) Expected result is a downloaded file of more than zero bytes, Actual result is a zero byte file and the following logged errors: [WARN] XSLT::Base: Unknown IO errorI/O warning : failed to load external entity "http://www.loc.gov/marcxml/xslt/MARC21slimUtils.xsl" compilation error: file /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MADS.xsl element include xsl:include : unable to load http://www.loc.gov/marcxml/xslt/MARC21slimUtils.xsl at /kohadevbox/koha/Koha/XSLT/Base.pm line 346. [WARN] Use of uninitialized value $marc in print at /kohadevbox/koha/authorities/export.pl line 47. If you eventually notice that the URL, which seems to work fine in a browser, is actually sending a 301 to http://www.loc.gov/standards/marcxml/xslt/MARC21slimUtils.xsl and you update the include to that, it still fails. As bug 29556 pointed out, the MADS XSLT is alone in including MARC21slimUtils.xsl from LoC, all our others include our local copy. If we want to have a canary in the coal mine that tells us when that fails, we should make it something which will actually produce a visible failure, not this spectacularly obscure authority format download. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37235 [Bug 37235] Download single authority results in 500 error -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37252 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37252 --- Comment #1 from Phil Ringnalda <phil@chetcolibrary.org> --- Created attachment 168479 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168479&action=edit Bug 37252: Use our local copy of MARC21slimUtils.xsl in MARC21slim2MADS.xsl Our local copy of the Library of Congress stylesheet MARC21slim2MADS.xsl is our only one which includes MARC21slimUtils.xsl directly from the Library of Congress rather than including our local copy. That makes it a fragile canary for whatever reason that it currently isn't loading, but because it's not exactly the most popular menu choice in all of Koha, it's far from being one that anyone will notice. We should instead include our local copy, make the bug 29556 change to MARC21slim2MADS.xsl, and if someone wants to notice when including xsl from LoC fails, they should write a test for it rather than depend on someone noticing that saving authority records as MADS fails. Test plan: 1. Without the patch, Authorities - search for Smith - click the linked name of any result to show authorities/detail.pl 2. Save - MADS (XML) 3. Check your downloaded file, see that it is zero bytes 4. Apply patch, restart_all 5. Repeat step 2, but this time find that your downloaded file is more than zero bytes. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37252 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |phil@chetcolibrary.org |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37252 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37252 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168479|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 168485 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168485&action=edit Bug 37252: Use our local copy of MARC21slimUtils.xsl in MARC21slim2MADS.xsl Our local copy of the Library of Congress stylesheet MARC21slim2MADS.xsl is our only one which includes MARC21slimUtils.xsl directly from the Library of Congress rather than including our local copy. That makes it a fragile canary for whatever reason that it currently isn't loading, but because it's not exactly the most popular menu choice in all of Koha, it's far from being one that anyone will notice. We should instead include our local copy, make the bug 29556 change to MARC21slim2MADS.xsl, and if someone wants to notice when including xsl from LoC fails, they should write a test for it rather than depend on someone noticing that saving authority records as MADS fails. Test plan: 1. Without the patch, Authorities - search for Smith - click the linked name of any result to show authorities/detail.pl 2. Save - MADS (XML) 3. Check your downloaded file, see that it is zero bytes 4. Apply patch, restart_all 5. Repeat step 2, but this time find that your downloaded file is more than zero bytes. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37252 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. Before working through the test plan, apply bug 37235. Otherwise, you will get a 500 error for steps 2 and 3 of the test plan. 2. When applying the patch, say n (for no) to not apply the dependent patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37252 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |pedro.amorim@ptfs-europe.co |y.org |m CC| |pedro.amorim@ptfs-europe.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37252 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37252 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168485|0 |1 is obsolete| | --- Comment #4 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 168555 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168555&action=edit Bug 37252: Use our local copy of MARC21slimUtils.xsl in MARC21slim2MADS.xsl Our local copy of the Library of Congress stylesheet MARC21slim2MADS.xsl is our only one which includes MARC21slimUtils.xsl directly from the Library of Congress rather than including our local copy. That makes it a fragile canary for whatever reason that it currently isn't loading, but because it's not exactly the most popular menu choice in all of Koha, it's far from being one that anyone will notice. We should instead include our local copy, make the bug 29556 change to MARC21slim2MADS.xsl, and if someone wants to notice when including xsl from LoC fails, they should write a test for it rather than depend on someone noticing that saving authority records as MADS fails. Test plan: 1. Without the patch, Authorities - search for Smith - click the linked name of any result to show authorities/detail.pl 2. Save - MADS (XML) 3. Check your downloaded file, see that it is zero bytes 4. Apply patch, restart_all 5. Repeat step 2, but this time find that your downloaded file is more than zero bytes. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37252 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes the saving of release notes| |authority records in | |different formats in the | |staff interface | |(Authorities > search | |results > authority details | |> Save > select format). | |Before this fix, the | |downloaded records had a | |zero file size and were | |empty. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37252 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|This fixes the saving of |This fixes the saving of release notes|authority records in |authority records in MADS |different formats in the |format in the staff |staff interface |interface (Authorities > |(Authorities > search |search results > authority |results > authority details |details > Save > MADS |> Save > select format). |(XML)). Before this fix, |Before this fix, the |the downloaded records had |downloaded records had a |a zero file size and were |zero file size and were |empty. |empty. | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37252 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37252 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |23290 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23290 [Bug 23290] XSLT system preferences allow administrators to exploit XML and XSLT vulnerabilities -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37252 --- Comment #5 from David Cook <dcook@prosentient.com.au> --- I think the reason why the include of an external stylesheet would've failed would be due to the security added by bug 23290. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37252 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |24.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37252 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37252 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Version(s)|24.11.00 |24.11.00,24.05.06 released in| | Status|Pushed to main |Pushed to stable --- Comment #7 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Backported to 24.05.x for upcoming 24.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37252 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37252 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to oldstable |Needs documenting --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on Bug 37235 not in 23.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37252 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED --- Comment #9 from David Nind <david@davidnind.com> --- This fixes a bug, no change required to the manual. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37252 Bug 37252 depends on bug 37235, which changed state. Bug 37235 Summary: Download single authority results in 500 error https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37235 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org