When calling SearchAuthorities, there can be a lot of noise from MARC::Record. For each hit: Use of uninitialized value $tag in hash element at /usr/share/perl5/MARC/Record.pm line 202.
Created attachment 159274 [details] [review] Bug 35405: Remove noise from MARC::Record in SearchAuthorities We are calling ->field with an undef parameter. MARC::Record does not like that and says: Use of uninitialized value $tag in hash element at /usr/share/perl5/MARC/Record.pm line 202. For now, a fix at our side. Test plan: Run SearchAuthorities without passing an authtypecode. Without this patch, it results in a warning per hit. With this patch, the noise should be gone. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 159322 [details] [review] Bug 35405: Remove noise from MARC::Record in SearchAuthorities We are calling ->field with an undef parameter. MARC::Record does not like that and says: Use of uninitialized value $tag in hash element at /usr/share/perl5/MARC/Record.pm line 202. For now, a fix at our side. Test plan: Run SearchAuthorities without passing an authtypecode. Without this patch, it results in a warning per hit. With this patch, the noise should be gone. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com>
Testing notes (using KTD): 1. Go to Authorities. 2. Using the search in the header bar, click on the arrow to perform a search. 3. Note that the warning "Use of uninitialized value $tag in hash element at /usr/share/perl5/MARC/Record.pm line 202." appears several times in the /var/log/koha/kohadev/plack-intranet-error.log file. 4. Perform another search, except change the Authority type search from "Default" to "Corporate Name" (using the little selector before the arrow). 5. Note that the warning message in step 3 is not recorded in the log file. 6. Apply the patch and restart_all 7. Repeat steps 2-5 - the warning in step 3 no longer appears. Additional note: this warning message appears in the log file once for each search (whether or not the authority type is selected) "[WARN] Use of uninitialized value $q2 in concatenation (.) or string at /kohadevbox/koha/C4/AuthoritiesMarc.pm line 230.".
Created attachment 159948 [details] [review] Bug 35405: Remove noise from MARC::Record in SearchAuthorities We are calling ->field with an undef parameter. MARC::Record does not like that and says: Use of uninitialized value $tag in hash element at /usr/share/perl5/MARC/Record.pm line 202. For now, a fix at our side. Test plan: Run SearchAuthorities without passing an authtypecode. Without this patch, it results in a warning per hit. With this patch, the noise should be gone. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pushed for 24.05! Well done everyone, thank you!
Pushed to 23.11.x for 23.11.02
Backported to 23.05.x for upcoming 23.05.08