Last modified: 2013-04-04 19:26:11 UTC
When a user request a new account, and error is reported from the DB: "UserAccountRequest::insertOn" 23502: ERROR: null value in column "acr_id" violates not-null constraint DETAIL: Failing row contains (null, Test, Test User, test@mail.test, ab2f7606450e0725380dd6668ed3a172, 2013-05-04 12:00:58+00, null, 2013-04-04 12:00:58+00, Text ..., , , 192.168.0.1/32, , Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:19.0) Gecko/20100101 ..., null, mediawiki:acctrequest:ip:192.168.0.1, 0, , f, null, null, null, ). ". After looking in the "UserAccountRequest.php" file, and "public function insertOn()", I think that the problem is with this code: $acr_id = is_null( $this->id ) ? $this->id : $dbw->nextSequenceValue( 'account_requests_acr_id_seq' ); If it is null, the code will use the NULL value, but if not, the code will use the next sequence. After changing the code to: $acr_id = !is_null( $this->id ) ? $this->id : $dbw->nextSequenceValue( 'account_requests_acr_id_seq' ); The user request account works as expected.
This was already fixed in master, backported in https://gerrit.wikimedia.org/r/#/c/57545/