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>
(cherry picked from commit ea1a282b5e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 247ebf90b2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
Nick Clemens 2023-07-11 13:59:50 +00:00 committed by Matt Blenkinsop
parent a261d736d1
commit 8160a65283
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()" />