Bug 10165

Summary: Trying to clear reading history when AnonymousPatron unset and DEBUG is on causes fatal error
Product: Koha Reporter: Jared Camins-Esakov <jcamins>
Component: PatronsAssignee: Bugs List <koha-bugs>
Status: CLOSED INVALID QA Contact:
Severity: critical    
Priority: P5 - low CC: gmcharlt, jonathan.druart, kyle.m.hall
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 6506    
Bug Blocks: 9944    

Description Jared Camins-Esakov 2013-05-01 12:48:06 UTC
I get the following error:

DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`koha`.`old_issues`, CONSTRAINT `old_issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE SET NULL) at /home/jcamins/kohaclone/C4/Circulation.pm line 2859.
 at /home/jcamins/kohaclone/opac/opac-privacy.pl line 77

This should be addressed by catching any errors thrown by that query, and setting $anonymisation_err appropriately.
Comment 1 Jonathan Druart 2015-04-09 10:33:22 UTC
This means you run the OPAC with DEBUG set and enabled a feature without configuring it :)

IMO this is not valid. Note that the error is correctly handled if DEBUG is off.
Please reopen if you disagree.