Page MenuHomePhabricator

Flow: SQL error if anon user makes first header edit
Closed, ResolvedPublic


Logout, then find a Flow page with at least one topic (otherwise you'll trigger a different bug 59637). On ee-flow, find an empty User_talk page, add a topic, then reload it.

Now click the pencil icon next to the default "This talk page currently has no header" header, add some header text, and click [Save header]. The page displays
an errorbox with

An error occurred.
The error message received was: Exception Caught: failed insert

and $wgDebugLogFile contains

HTTP: POST: http://localhost:8000/localhost/User_talk:4pq1injbak
DatabaseBase::query: Writes done: INSERT INTO flow_revision (rev_id,rev_user_id,rev_user_ip,rev_parent_id,rev_change_type,rev_type,rev_content,rev_flags,rev_mod_state,rev_mod_user_id,rev_mod_user_ip,rev_mod_timestamp,rev_mod_reason,rev_last_edit_id,rev_edit_user_id,rev_edit_user_ip) VALUES (' \roÔlãð ȱú >hĬ','0',NULL,NULL,'create-header','header','<p data-parsoid=\'{\"dsr\":[0,34,0,0]}\'>Anonymous user editing the header.</p>','utf-8,html','',NULL,NULL,NULL,NULL,NULL,NULL,NULL)
MessageCache::load: Loading en... got from global cache
SQL ERROR: Column 'rc_user_text' cannot be null (localhost)
[exception] [94f15f7e] /w/api.php Exception from line 498 of /srv/mediawiki/extensions/Flow/includes/Data/ObjectManager.php: failed insert
#0 /srv/mediawiki/extensions/Flow/includes/Data/ObjectManager.php(470): Flow\Data\ObjectManager->insert(Object(Flow\Model\Header))
#1 /srv/mediawiki/extensions/Flow/includes/Data/ObjectManager.php(167): Flow\Data\ObjectManager->put(Object(Flow\Model\Header))
#2 /srv/mediawiki/extensions/Flow/includes/Block/Header.php(113): Flow\Data\ManagerGroup->put(Object(Flow\Model\Header))
#3 /srv/mediawiki/extensions/Flow/includes/WorkflowLoader.php(206): Flow\Block\HeaderBlock->commit()
#4 /srv/mediawiki/extensions/Flow/includes/api/ApiFlow.php(59): Flow\WorkflowLoader->commit(Object(Flow\Model\Workflow), Array)
#5 /srv/mediawiki/includes/api/ApiMain.php(862): ApiFlow->execute()
#6 /srv/mediawiki/includes/api/ApiMain.php(387): ApiMain->executeAction()
#7 /srv/mediawiki/includes/api/ApiMain.php(358): ApiMain->executeActionWithErrorHandling()
#8 /srv/mediawiki/api.php(76): ApiMain->execute()
#9 {main}
ApiMain::setCacheMode: setting cache mode private

Version: master
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:16 AM
bzimport set Reference to bz59638.
bzimport added a subscriber: Unknown Object (MLST).

bingle-admin wrote:

The WMF core features team tracks this bug on Mingle card, but people from the community are welcome to contribute here and in Gerrit.

Change 107757 had a related patch set uploaded by Bsitu:
Anon users creating new header results in SQL error

Change 107757 merged by jenkins-bot:
Anon users creating new header results in SQL error

fix merged, will deploy with the jan 30 train