https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22720 Bug ID: 22720 Summary: Including branchcode in PatronSelfModificationBorrowerUnwantedField causes internal server error on self registration page Change sponsored?: --- Product: Koha Version: 18.05 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: barton@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Target Milestone: --- If the system preference PatronSelfModificationBorrowerUnwantedField contains branchcode, the branch drop-down isn't populated on the self reigistration page (koha/opac-memberentry.pl). This causes a foreign key constraint violation when the new borrower is added to the borrowers table: [Tue Apr 16 13:56:02.588293 2019] [cgi:error] [pid 12231] [client 10.208.131.107:37284] AH01215: [Tue Apr 16 13:56:02 2019] opac-memberentry.pl: DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`load08`.`borrowers`, CONSTRAINT `borrowers_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)) [for Statement "INSERT INTO `borrowers` ( `address`, `borrowernumber`, `categorycode`, `city`, `dateenrolled`, `dateexpiry`, `dateofbirth`, `email`, `firstname`, `password`, `privacy`, `state`, `surname`, `userid`, `zipcode`) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" with ParamValues: 0="foo", 1=undef, 2='OBR', 3="foo", 4='2019-04-16T13:56:02', 5='2019-05-16T13:56:02', 6='1970-01-01', 7="foo@example.com", 8="foo", 9='foo', 10=1, 11="CA", 12="foo", 13='foo.foo', 14="99999"] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832., referer: https://foo.bywatersolutions.com/cgi-bin/koha/opac-memberentry.pl To re-create 1) add branchcode to the field list in PatronSelfModificationBorrowerUnwantedField 2) Click 'Register here' link on the front page of the opac 3) Fill out patron data and click 'Submit' => internal server error. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.