To recreate: 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.
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