Cannot determine authority type for record: 1709 at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch.pm line 589. Use of uninitialized value $subfields in pattern match (m//) at /kohadevbox/koha/C4/Heading/MARC21.pm line 412. Use of uninitialized value $subfields in pattern match (m//) at /kohadevbox/koha/C4/Heading/MARC21.pm line 448.
I think this is because tag 109 is not defined in C4::Heading::MARC21::$auth_heading_fields What is 109 here?
Created attachment 167012 [details] [review] Bug 36917: Remove some warnings from t/db_dependent/Authority/Merge.t Cannot determine authority type for record: 1709 at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch.pm line 589. Use of uninitialized value $subfields in pattern match (m//) at /kohadevbox/koha/C4/Heading/MARC21.pm line 412. Use of uninitialized value $subfields in pattern match (m//) at /kohadevbox/koha/C4/Heading/MARC21.pm line 448. This change removes the 2 "Use of uninitialized value $subfields in pattern match (m//)" warnings To be honest I am not really sure what I am doing here but this looks safe enough. Can one of you confirm?
(In reply to Jonathan Druart from comment #2) > Can one of you confirm? Will have a look. Note that this test ran fine for years so there must be some new trigger ?
Probably storing the heading from bug 30047
This might be an issue: return {} if !$authtype; # very exceptional
Created attachment 167023 [details] [review] Bug 36917: Remove some warnings from t/db_dependent/Authority/Merge.t Cannot determine authority type for record: 1709 at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch.pm line 589. Use of uninitialized value $subfields in pattern match (m//) at /kohadevbox/koha/C4/Heading/MARC21.pm line 412. Use of uninitialized value $subfields in pattern match (m//) at /kohadevbox/koha/C4/Heading/MARC21.pm line 448. This change removes the 2 "Use of uninitialized value $subfields in pattern match (m//)" warnings To be honest I am not really sure what I am doing here but this looks safe enough. Can one of you confirm? Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 167025 [details] [review] Bug 36917: Remove some warnings from t/db_dependent/Authority/Merge.t Cannot determine authority type for record: 1709 at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch.pm line 589. Use of uninitialized value $subfields in pattern match (m//) at /kohadevbox/koha/C4/Heading/MARC21.pm line 412. Use of uninitialized value $subfields in pattern match (m//) at /kohadevbox/koha/C4/Heading/MARC21.pm line 448. This change removes the 2 "Use of uninitialized value $subfields in pattern match (m//)" warnings The warnings are gnerated because the subfields for headings are hardcoded variables in C4::Heading::MARC21 for any genuine authority record we should receive the correct list of subfields. The tests in this case are mocking a new authtype, and so do not find the correct subfields. Skipping the generation here silences the warnings and will prevent user defined types from throwing errors as well. NOTE: Koha allows the user to define their own authority types, however, we have various features hardcoded that will prevent them from working as expected WNC amended commit message Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 167026 [details] [review] Bug 36917: (follow-up) Remove Elasticsearch warnings and tidy Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 167027 [details] [review] Bug 36917: (follow-up) Add FIXME for marcflavour Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Back to you to review my follow-ups Joubu
Created attachment 167033 [details] [review] Bug 36917: (follow-up) Remove Elasticsearch warnings and tidy Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 167034 [details] [review] Bug 36917: (follow-up) Add FIXME for marcflavour Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(In reply to Nick Clemens (kidclamp) from comment #10) > Back to you to review my follow-ups Joubu Done, thanks!
Created attachment 167154 [details] [review] Bug 36917: (follow-up) Remove Elasticsearch warnings and tidy Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 167155 [details] [review] Bug 36917: (follow-up) Add FIXME for marcflavour Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed for 24.05! Well done everyone, thank you!
Depends on Bug 30047 not in 23.11.x
Test suite changes don't induce changes to the manual afaik. Closing, but feel free to reopen if the status was put there to document something in the coding guidelines