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.
Created attachment 168479 [details] [review] 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.
Created attachment 168485 [details] [review] 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>
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.
Created attachment 168555 [details] [review] 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>