Re: [Wikitech-l] Help please! Database::close: mass commit/rollback... on Special Page

2019-04-26 Thread Gergo Tisza
On Fri, Apr 26, 2019 at 10:19 AM Jim Hu wrote: > The code is throwing the mass commit error only if something interrupts > processing before execution is complete - that includes my testing with > die() statements or other errors that I’ve been tracking down. So it seems > like doing execution vi

Re: [Wikitech-l] Help please! Database::close: mass commit/rollback... on Special Page

2019-04-26 Thread Jim Hu
Following up. I did some tests on some Special Page extensions I wrote based on the updated documentation at mediawiki.org . Here they are, in case anyone is interested. Both work, so the HTMLform callback is NOT the problem. https://github.com/jimhu-tamu/scratch/tree/ma

Re: [Wikitech-l] Help please! Database::close: mass commit/rollback... on Special Page

2019-04-23 Thread Gergo Tisza
> $dbw = wfGetDB( DB_SLAVE ); > $dbw->insert( 'omp_master.strain', array( 'id' => null, 'name' => $formData['strain_name_field'] ) ); You should use wfGetDB( DB_MASTER ) to get a DB handle for writing. On Tue, Apr 23, 2019 at 9:16 AM Jim Hu wrote: > It’s a custom extension used by my lab only,

Re: [Wikitech-l] Help please! Database::close: mass commit/rollback... on Special Page

2019-04-23 Thread Jim Hu
It’s a custom extension used by my lab only, and while a version is on our public github, it’s going to be hard to follow because of entanglement with some other custom code libraries we use that wrap the WikiPage class to accommodate our use of the TableEdit extension. If you want to look anywa

Re: [Wikitech-l] Help please! Database::close: mass commit/rollback... on Special Page

2019-04-23 Thread Jaime Crespo
> > 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. I am not familiar with Special:StrainNewPage, I am guessing that is custom code not available from a s

Re: [Wikitech-l] Help please! Database::close: mass commit/rollback... on Special Page

2019-04-22 Thread Gergo Tisza
That means an implicit transaction [1] was started but not committed/cancelled. For special pages transaction handling is done by the framework and this should not happen unless you are doing something strange, like obtaining a connection in a non-standard way. Application errors (ie. something thr

[Wikitech-l] Help please! Database::close: mass commit/rollback... on Special Page

2019-04-22 Thread Jim Hu
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