For one of our custom wikis we have a Special Page that creates new pages based on form
input. This used to work in MW1.23 but in the long overdue update to MW1.31 it stopped
working.
The Special Page is supposed to write a record to a shared external database and then use
the autoincremented row number to set the name of the page that will be created. I’m using
$dbw->insert to do this. In 1.31 the autoincrement index gets bumped but the row
doesn’t get written. If I do the same insert from a maintenance script, it works, so I’m
assuming it doesn’t have anything to do with general configurations or other extensions
(which I’ve inactivated).
After it gets a value for the lastInsertID it tries to make a page from a template. That
page is never created and I see this in the error logs:
PHP Fatal error: Uncaught Wikimedia\\Rdbms\\DBUnexpectedError:
Wikimedia\\Rdbms\\Database::close: mass commit/rollback of peer transaction required
(DBO_TRX set). in
/Library/WebServer/Documents/omp/wiki/includes/libs/rdbms/database/Database.php:916\nStack
trace:\n#0
/Library/WebServer/Documents/omp/wiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1217):
Wikimedia\\Rdbms\\Database->close()\n#1
[internal function]:
Wikimedia\\Rdbms\\LoadBalancer->Wikimedia\\Rdbms\\{closure}(Object(Wikimedia\\Rdbms\\DatabaseMysqli))\n#2
/Library/WebServer/Documents/omp/wiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1640):
call_user_func_array(Object(Closure), Array)\n#3
/Library/WebServer/Documents/omp/wiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1218):
Wikimedia\\Rdbms\\LoadBalancer->forEachOpenConnection(Object(Closure))\n#4
/Library/WebServer/Documents/omp/wiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1208):
Wikimedia\\Rdbms\\LoadBalancer->closeAll()\n#5
/Library/WebServer/Documents/omp/wiki/includes/libs/rdbms/loadbalancer/LoadBal in
/Library/WebServer/Documents/omp/wiki/includes/libs/rdbms/database/Database.php on line
916,
referer:
http://localhost/omp/wiki/index.php/Special:StrainNewPage
This happens even if comment out the code that accesses the external database completely
and hard code the ID.
Other Special Page extensions we have that create new pages seem to work on 1.31.1. I’m
wondering if this is related to the method that now fails being a callback from HTMLforms
for processing form submission.
Any insight, help in debugging this would be much appreciated. Apologies if I’m using some
terminology incorrectly (I’m a biologist more than a coder).
Jim Hu