After upgrading from MW 1.19 to MW 1.23 and ConfirmAccount r115623 to REL1_23, I had to add the acd_xff and acd_agent fields, and I had to add them to account_requests, not account_credentials.
tl;dr: Run these in mysql, substituting your wiki's database name for wikidb:
USE wikidb;
ALTER TABLE mw_account_requests ADD acr_agent VARCHAR(255) NULL default '';''
ALTER TABLE mw_account_requests ADD acr_xff VARCHAR(255) NULL default '';''
There may be a better way to fix it. The underlying problem is that new fields added to ConfirmAccount across LTS version upgrades are not automatically added to the wiki database. Ideally, the extension would attempt to add necessary fields if they don't exist.
--
The error and backtrace:
A database query error has occurred. This may indicate a bug in the software.
Query:
INSERT INTO `mw_account_requests` (acr_id,acr_name,acr_email,acr_real_name,acr_registration,acr_bio,acr_notes,acr_urls,acr_type,acr_areas,acr_filename,acr_storage_key,acr_comment,acr_ip,acr_xff,acr_agent,acr_deleted,acr_email_token,acr_email_token_expires) VALUES (NULL,'Z','x@y.z','aowiefawe','20150712184313','Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum.','','','0','',NULL,'wikidb-mw_:acctrequest:ip:--.--.--.--','','--.--.--.--','','Mozilla/5.0 (X11; CrOS x86_64 6946.70.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36','0','--','20150811184313')''
Function: UserAccountRequest::insertOn
Error: 1054 Unknown column 'acr_xff' in 'field list' (localhost)
Backtrace:
#0 /var/www/wiki/includes/db/Database.php(1123): DatabaseBase->reportQueryError('Unknown column ...', 1054, 'INSERT INTO `m...', 'UserAccountRequ...', false)
#1 /var/www/wiki/includes/db/Database.php(1920): DatabaseBase->query('INSERT INTO `m...', 'UserAccountRequ...')
#2 /var/www/wiki/extensions/ConfirmAccount/backend/UserAccountRequest.php(358): DatabaseBase->insert('account_request...', Array, 'UserAccountRequ...')
#3 /var/www/wiki/extensions/ConfirmAccount/business/AccountRequestSubmission.php(243): UserAccountRequest->insertOn()
#4 /var/www/wiki/extensions/ConfirmAccount/frontend/specialpages/actions/RequestAccount_body.php(315): AccountRequestSubmission->submit(Object(RequestContext))
#5 /var/www/wiki/extensions/ConfirmAccount/frontend/specialpages/actions/RequestAccount_body.php(80): RequestAccountPage->doSubmit()
#6 /var/www/wiki/includes/specialpage/SpecialPage.php(379): RequestAccountPage->execute(NULL)
#7 /var/www/wiki/includes/specialpage/SpecialPageFactory.php(503): SpecialPage->run(NULL)
#8 /var/www/wiki/includes/Wiki.php(285): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#9 /var/www/wiki/includes/Wiki.php(588): MediaWiki->performRequest()
#10 /var/www/wiki/includes/Wiki.php(447): MediaWiki->main()
#11 /var/www/wiki/index.php(46): MediaWiki->run()
#12 {main}
You can generate this message by adding these to the end of your wiki's LocalSettings.php file:
$wgShowSQLErrors = true;
$wgDebugDumpSql = true;
$wgShowDBErrorBacktrace = true;
--
Console I/O to fix it:
➜ ~ sudo mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1506962
Server version: 5.5.31-0ubuntu0.12.04.1 (Ubuntu)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use wikidb;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> ALTER TABLE mw_account_requests ADD acr_agent VARCHAR(255) NULL default '';''
Query OK, 1 row affected (0.10 sec)
Records: 1 Duplicates: 0 Warnings: 0
mysql> ALTER TABLE mw_account_requests ADD acr_xff VARCHAR(255) NULL default '';''
Query OK, 1 row affected (0.23 sec)
Records: 1 Duplicates: 0 Warnings: 0