Hi Jonathan

In file "search_for_data_inconsistencies.pl" I found the line

push @decoding_errors, $@ if $@;

which I changed to

push @decoding_errors, sprintf("ID=%s - %s", $biblio->biblionumber, $@);

After running "search_for_data_inconsistencies.pl" again, I found three ID numbers saying:

DBIC result _type isn't of the _type BiblioMetadata at /usr/share/koha/bin/maintenance/search_for_data_inconsistencies.pl line 124.

I searched for these numbers in the staff client and I found them - but when trying to show the detail view Koha said:

The record you requested does not exist (10).

Also I found the content of these records in table "biblio" but not in table "biblio_metadata".

Do you think it's safe to just delete these records in table "biblio" and then to reindex the database?

Best wishes: Michael
--
Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis
Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz
T 0041 (0)61 261 55 61 · E m...@adminkuhn.ch · W www.adminkuhn.ch



Am 02.10.23 um 11:08 schrieb Jonathan Druart:
Hi,
This is a bug, there is a lack of information. Please report on bugzilla and if possible provide a patch.

You should be able to get more info (biblionumber) with the following change:

diff --git a/misc/maintenance/search_for_data_inconsistencies.pl <http://search_for_data_inconsistencies.pl> b/misc/maintenance/search_for_data_inconsistencies.pl <http://search_for_data_inconsistencies.pl>
index ddc6b457dd1..92de2bd91b8 100755
--- a/misc/maintenance/search_for_data_inconsistencies.pl <http://search_for_data_inconsistencies.pl> +++ b/misc/maintenance/search_for_data_inconsistencies.pl <http://search_for_data_inconsistencies.pl>
@@ -126,7 +126,7 @@ use C4::Biblio qw( GetMarcFromKohaField );
      while ( my $biblio = $biblios->next ) {
          my $record = eval{$biblio->metadata->record;};
          if ($@) {
-            push @decoding_errors, $@;
+            push @decoding_errors, sprintf("ID=%s - %s", $biblio->biblionumber, $@);
              next;
          }
          my ( $biblionumber, $biblioitemnumber );

Regards,
Jonathan


Le dim. 1 oct. 2023 à 18:13, Michael Kuhn <m...@adminkuhn.ch <mailto:m...@adminkuhn.ch>> a écrit :

    Hi

    We are using Koha 21.11.09 with MariaDB 10.3.38, running on Debian
    GNU/Linux 10.

    When running script "search_for_data_inconsistencies.pl
    <http://search_for_data_inconsistencies.pl>" we are getting
    the following output:


    == Bibliographic records have invalid MARCXML ==
    * DBIC result _type  isn't of the _type BiblioMetadata at
    /usr/share/koha/bin/maintenance/search_for_data_inconsistencies.pl
    <http://search_for_data_inconsistencies.pl> line 124.
    * DBIC result _type  isn't of the _type BiblioMetadata at
    /usr/share/koha/bin/maintenance/search_for_data_inconsistencies.pl
    <http://search_for_data_inconsistencies.pl> line 124.
    * DBIC result _type  isn't of the _type BiblioMetadata at
    /usr/share/koha/bin/maintenance/search_for_data_inconsistencies.pl
    <http://search_for_data_inconsistencies.pl> line 124.

    => The bibliographic records must have a valid MARCXML or you will face
    encoding issues or wrong displays


    Does anyone know how to obtain further information (biblionumbers?) for
    these cases?

    Best wishes: Michael
-- Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis
    Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz
    T 0041 (0)61 261 55 61 · E m...@adminkuhn.ch
    <mailto:m...@adminkuhn.ch> · W www.adminkuhn.ch <http://www.adminkuhn.ch>
    _______________________________________________

    Koha mailing list http://koha-community.org <http://koha-community.org>
    Koha@lists.katipo.co.nz <mailto:Koha@lists.katipo.co.nz>
    Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
    <https://lists.katipo.co.nz/mailman/listinfo/koha>



_______________________________________________

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha

Reply via email to