[Koha-bugs] [Bug 19808] New: Data corruption causing an Internal Server Error when seeing a record' s details. Which have reviews from deleted borrowers.

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Dec 13 21:30:54 CET 2017


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

            Bug ID: 19808
           Summary: Data corruption causing an Internal Server Error when
                    seeing a record's details. Which have reviews from
                    deleted borrowers.
 Change sponsored?: ---
           Product: Koha
           Version: 17.11
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P5 - low
         Component: OPAC
          Assignee: oleonard at myacpl.org
          Reporter: victor.grousset at biblibre.com
        QA Contact: testopia at bugs.koha-community.org

Found by Joubu.

===== Cause =====
plack-error.log:
> Can't call method "title" on an undefined value at /home/koha/src/opac/opac-detail.pl line 847.

code:
> # setting some borrower info into this hash
> $review->{title}     = $patron->title;

db:
> CONSTRAINT `reviews_ibfk_1`
> FOREIGN KEY (`borrowernumber`)
> REFERENCES `borrowers` (`borrowernumber`)
> ON DELETE SET NULL ON UPDATE CASCADE,

The reviews are kept even if the user was deleted

BZ 15839 is suspected to have introduced this bug.

===== Fix =====
The first step is to fix the 500 error.
And then study the relevance of "on delete set null".
And take care of the existing data.

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


More information about the Koha-bugs mailing list