Last modified: 2013-04-04 19:26:11 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T48894, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 46894 - Unable to request user account with PostgreSQL
Unable to request user account with PostgreSQL
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
ConfirmAccount (Other open bugs)
REL1_20-branch
Other FreeBSD
: Unprioritized critical (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-04 14:24 UTC by Rafael Henrique da Silva Faria
Modified: 2013-04-04 19:26 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Rafael Henrique da Silva Faria 2013-04-04 14:24:30 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.
Comment 1 Aaron Schulz 2013-04-04 19:26:11 UTC
This was already fixed in master, backported in https://gerrit.wikimedia.org/r/#/c/57545/

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links