Summary: | Import from Z39.50 doesn't open the record in editor | ||
---|---|---|---|
Product: | Koha | Reporter: | Caroline Cyr La Rose <caroline.cyr-la-rose> |
Component: | Cataloging | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | Pushed to oldstable --- | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | major | ||
Priority: | P5 - low | CC: | david, ddaghita, ephetteplace, isabel.pineda, jonathan.druart, lucas, m.de.rooy, mnero, phil, quersumme |
Version: | Main | Keywords: | regression |
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
24.11.00,24.05.05
|
|
Circulation function: | |||
Bug Depends on: | 37429 | ||
Bug Blocks: | 38076, 38211, 37946 | ||
Attachments: |
Bug 37947: (bug 37429 follow-up) Fix addbiblio and frameworkcode="Default"
Bug 37947: (bug 37429 follow-up) Fix addbiblio and frameworkcode="Default" Bug 37947: (bug 37429 follow-up) Fix addbiblio and frameworkcode="Default" |
Description
Caroline Cyr La Rose
2024-09-17 16:50:52 UTC
I can confirm that this is happening. KTD with main. Workaround (assuming you aren't currently trying to document New from Z39.50/SRU ;)): Cataloging - New record - Z39.50/SRU search Workaround #2: when you are faced with the empty page with no editor, delete the word Default from the URL in &frameworkcode=Default since the code for the default framework is "", not "Default". We were passing "Default" to z3950_search.pl and getting "" in the addbiblio.pl URL back when New from Z39.50/SRU used to work, so apparently someone got rid of something that did s/Default// somewhere along the line. Although, https://git.koha-community.org/Koha-community/Koha/src/commit/40d9f2cf184bb9b3c93c54a4500b6aa5d86d0ccf/cataloguing/addbiblio.pl#L540 still exists, so maybe that's not it. bisect says 8aced236e9 from bug 37429 (which I wanted to blame, but couldn't see any reason why it would break this). Created attachment 171709 [details] [review] Bug 37947: (bug 37429 follow-up) Fix addbiblio and frameworkcode="Default" On bug 37429 we reordered the global var to assign them before anything else. The logic is correct except for $frameworkcode, we want to do some processings (like defaulting to "" if eq "Default") BEFORE we retrieve the MARC structure ($tagslib, $usedTagsLib). This patch also moved this code after get_template_and_user (and so authentication), like it should be everywhere. Test plan: 1. Go to Cataloging 2. Click on New from Z39.50/SRU 3. Make a search in the library of congress server for anything (Caroline searched for author: shakespeare) 4. Click on one of the results and choose Import Without this patch the basic editor appears, but not the record With this patch applied the bug is fixed and you can edit the record Created attachment 171711 [details] [review] Bug 37947: (bug 37429 follow-up) Fix addbiblio and frameworkcode="Default" On bug 37429 we reordered the global var to assign them before anything else. The logic is correct except for $frameworkcode, we want to do some processings (like defaulting to "" if eq "Default") BEFORE we retrieve the MARC structure ($tagslib, $usedTagsLib). This patch also moved this code after get_template_and_user (and so authentication), like it should be everywhere. Test plan: 1. Go to Cataloging 2. Click on New from Z39.50/SRU 3. Make a search in the library of congress server for anything (Caroline searched for author: shakespeare) 4. Click on one of the results and choose Import Without this patch the basic editor appears, but not the record With this patch applied the bug is fixed and you can edit the record Signed-off-by: David Nind <david@davidnind.com> Created attachment 171822 [details] [review] Bug 37947: (bug 37429 follow-up) Fix addbiblio and frameworkcode="Default" On bug 37429 we reordered the global var to assign them before anything else. The logic is correct except for $frameworkcode, we want to do some processings (like defaulting to "" if eq "Default") BEFORE we retrieve the MARC structure ($tagslib, $usedTagsLib). This patch also moved this code after get_template_and_user (and so authentication), like it should be everywhere. Test plan: 1. Go to Cataloging 2. Click on New from Z39.50/SRU 3. Make a search in the library of congress server for anything (Caroline searched for author: shakespeare) 4. Click on one of the results and choose Import Without this patch the basic editor appears, but not the record With this patch applied the bug is fixed and you can edit the record Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Pushed for 24.11! Well done everyone, thank you! Backported to 24.05.x for upcoming 24.05.05 *** Bug 38168 has been marked as a duplicate of this bug. *** The following is regarding my standard KOHA installation (according to http://wiki.koha-community.org/wiki/Debian) under Ubuntu Server 24.x with Apache 2. My successfully tested workaround makes use of the apache "substitute" module: - Edit /etc/apache2/sites-available/<koha-instance name>.conf - In the "intranet" virtualhost section, add the following two lines: SetOutputFilter SUBSTITUTE Substitute 's|frameworkcode=Default|frameworkcode=|nq' - sudo a2enmod substitute - sudo systemctl restart apache2 |