Bug 33270: (follow-up) Handle records that fail attempt to ignore bad characters

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Nick Clemens 2023-07-11 13:59:50 +00:00 committed by Tomas Cohen Arazi
parent c71468537b
commit ea1a282b5e
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 10 additions and 1 deletions

View file

@ -170,6 +170,15 @@ sub GetRecords {
%params
)
);
} elsif ($marcxml_error) {
my $record = MARC::Record->new();
my $marcxml = $record->as_xml_record();
$self->record(
Koha::OAI::Server::Record->new(
$repository, $marcxml, $timestamp, \@setSpecs,
%params
)
);
} else {
$self->record(
Koha::OAI::Server::DeletedRecord->new(

View file

@ -349,7 +349,7 @@
<span>
<xsl:choose>
<xsl:when test="text()='INVALID_METADATA'">
There was a problem decoding the metadata for this record, invalid characters were stripped. See system logs for details
There was a problem decoding the metadata for this record, an attempt was made to ignore invalid characters, the metadata view may be degraded. See system logs for details
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="text()" />