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.
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.