Summary: | Noisy warns in addbiblio.pl when importing from Z3950 | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | Cataloging | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | 1joynelson, jonathan.druart, lucas, m.de.rooy, mkstephens |
Version: | Main | ||
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: |
20.05.00, 19.11.03
|
|
Circulation function: | |||
Attachments: |
Bug 23844: Check if field defined in framework and specify 'Default' for framework
Bug 23844: Check if field defined in framework and specify 'Default' for framework Bug 23844: Check if field defined in framework and specify 'Default' for framework |
Description
Nick Clemens (kidclamp)
2019-10-18 18:26:06 UTC
Created attachment 94416 [details] [review] Bug 23844: Check if field defined in framework and specify 'Default' for framework To test: 1 - Go to Cataloguing 2 - New from Z3950 3 - Find an import a record 4 - Check the plack logs: Use of uninitialized value in string ne at /kohadevbox/koha/cataloguing/addbiblio.pl line 565. Use of uninitialized value in string ne at /kohadevbox/koha/cataloguing/addbiblio.pl line 580. Use of uninitialized value $frameworkcode in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 711. Use of uninitialized value $frameworkcode in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 715. Use of uninitialized value $frameworkcode in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 734. 5 - Apply patch 6 - Repeat 7 - No new errors 8 - Confirm selecting 'Default' from 'New from Z3950' dropdown also generates no errors Created attachment 97585 [details] [review] Bug 23844: Check if field defined in framework and specify 'Default' for framework To test: 1 - Go to Cataloguing 2 - New from Z3950 3 - Find an import a record 4 - Check the plack logs: Use of uninitialized value in string ne at /kohadevbox/koha/cataloguing/addbiblio.pl line 565. Use of uninitialized value in string ne at /kohadevbox/koha/cataloguing/addbiblio.pl line 580. Use of uninitialized value $frameworkcode in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 711. Use of uninitialized value $frameworkcode in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 715. Use of uninitialized value $frameworkcode in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 734. 5 - Apply patch 6 - Repeat 7 - No new errors 8 - Confirm selecting 'Default' from 'New from Z3950' dropdown also generates no errors Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu> Patch works as described for Cataloging > New from Z39.50 and Cataloging > New from Z39.50 > Default framework. I would like to point out that the $frameworkcode errors do still appear with this patch applied when adding records using Catloging > New Record > Default framework > Z39.50 search and also when using the New > New Record (then click Z39.50 search button) option from within an existing record. My plack logs showed the $frameworkcode errors on lines 708, 712, and 731, and I'm seeing a lot more "uninitialized value in string ne" errors than in the example provided. I'm also seeing the following error regardless of method for adding records: "Use of uninitialized value $searchid in concatenation (.) or string at /kohadevbox/koha/cataloguing/addbiblio.pl line 860." Nick, I only get those: Use of uninitialized value $frameworkcode in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 708. Use of uninitialized value $frameworkcode in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 712. Use of uninitialized value $frameworkcode in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 731. Who did you end up with tab that is NULL? I get: MariaDB [koha_kohadev]> select distinct(tab) from marc_subfield_structure; +------+ | tab | +------+ | -1 | | 0 | | 1 | | 2 | | 3 | | 4 | | 5 | | 6 | | 7 | | 8 | | 9 | | 10 | +------+ 12 rows in set (0.03 sec) (In reply to Jonathan Druart from comment #4) > Nick, I only get those: > > Use of uninitialized value $frameworkcode in string eq at > /kohadevbox/koha/cataloguing/addbiblio.pl line 708. > Use of uninitialized value $frameworkcode in string eq at > /kohadevbox/koha/cataloguing/addbiblio.pl line 712. > Use of uninitialized value $frameworkcode in string eq at > /kohadevbox/koha/cataloguing/addbiblio.pl line 731. > > > Who did you end up with tab that is NULL? > > I get: > MariaDB [koha_kohadev]> select distinct(tab) from marc_subfield_structure; > +------+ > | tab | > +------+ > | -1 | > | 0 | > | 1 | > | 2 | > | 3 | > | 4 | > | 5 | > | 6 | > | 7 | > | 8 | > | 9 | > | 10 | > +------+ > 12 rows in set (0.03 sec) I believe the issue here is when the imported record has fields that are not defined in the frameworks - so we are trying to get the tab for a field that has no tab defined. Created attachment 98446 [details] [review] Bug 23844: Check if field defined in framework and specify 'Default' for framework To test: 1 - Go to Cataloguing 2 - New from Z3950 3 - Find an import a record 4 - Check the plack logs: Use of uninitialized value in string ne at /kohadevbox/koha/cataloguing/addbiblio.pl line 565. Use of uninitialized value in string ne at /kohadevbox/koha/cataloguing/addbiblio.pl line 580. Use of uninitialized value $frameworkcode in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 711. Use of uninitialized value $frameworkcode in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 715. Use of uninitialized value $frameworkcode in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 734. 5 - Apply patch 6 - Repeat 7 - No new errors 8 - Confirm selecting 'Default' from 'New from Z3950' dropdown also generates no errors Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Note: the template change does not seem necessary here but should not hurt Nice work everyone! Pushed to master for 20.05 Pushed to 19.11.x branch for 19.11.03 doesnt apply clean to 19.05.x, no backport |