[Koha-bugs] [Bug 30008] Software error in details.pl when invalid MARCXML and showing component records

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Mar 18 09:40:39 CET 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30008

--- Comment #6 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
(In reply to Marcel de Rooy from comment #5)
> Small note:
> 
> +    if ( my $components = $marc_record ?
> $biblio->get_marc_components(C4::Context->preference('MaxComponentRecords'))
> : undef ) {
> 
> From a theoretical perspective I would prefer to test $biblio here instead
> of $marc_record.
> If there is a biblio object, I can call it and if there is somehow no marc
> record, then I expect no components back ;)
> But it works, ok.

No, that's the point. You can have a $biblio but no $marc_record.
The error will happen later in get_components_query.

It's what we decided earlier on bug 29690, we are dealing on invalid MARC
*only* on this view. We add a big warning and data has to be fixed.
There is also misc/maintenance/search_for_data_inconsistencies.pl that can
catch such problems.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list