diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 763bb32f3f..454b1109bc 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2477,14 +2477,18 @@ sub AddReturn { ); } } else { + my $error = "$@"; carp - "The checkin for the following issue failed, Please go to the about page and check all messages on the 'System information' to see if there are configuration / data issues ($@)" + "The checkin for the following issue failed, Please go to the about page and check all messages on the 'System information' to see if there are configuration / data issues, or see the specific message in parentheses ($@)" . Dumper( $issue->unblessed ); my $indexer = Koha::SearchEngine::Indexer->new( { index => $Koha::SearchEngine::BIBLIOS_INDEX } ); $indexer->index_records( $item->biblionumber, "specialUpdate", "biblioserver" ); - return ( 0, { WasReturned => 0, DataCorrupted => 1 }, $issue, $patron_unblessed ); + return ( + 0, { WasReturned => 0, DataCorrupted => $error }, $issue, + $patron_unblessed + ); } # FIXME is the "= 1" right? This could be the borrower hash. diff --git a/circ/returns.pl b/circ/returns.pl index 29b2d2f7bf..1721092cf5 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -758,7 +758,7 @@ foreach my $code ( keys %$messages ) { } elsif ( $code eq 'NotForLoanStatusUpdated' ) { $err{NotForLoanStatusUpdated} = $messages->{NotForLoanStatusUpdated}; } elsif ( $code eq 'DataCorrupted' ) { - $err{data_corrupted} = 1; + $err{data_corrupted} = $messages->{'DataCorrupted'}; } elsif ( $code eq 'ReturnClaims' ) { $template->param( ReturnClaims => $messages->{ReturnClaims} ); } elsif ( $code eq 'ClaimAutoResolved' ) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index fec7616ac6..ada8b5e82f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -399,11 +399,12 @@ [% IF ( errmsgloo.foreverdebarred ) %]

Reminder: Patron has an indefinite restriction.

[% END %] - [% IF errmsgloo.data_corrupted %] -

The item has not been checked in due to a configuration issue in your system. You must ask an administrator to take a look at the about page and correct all - errors shown on the "System information" tab

+ [% IF ( errmsgloo.data_corrupted ) %] +

+ The item has not been checked in due to an issue in your system. Note the error below. An administrator may find further details by looking at the about page and + correcting errors shown on the "System information" tab, or note the error below. +

+

Error: ([% errmsgloo.data_corrupted | html %])

[% END %] [% END # /FOREACH errmsgloo %]