Page MenuHomePhabricator

Flow: failed update (DataModelException) restoring hidden post
Closed, ResolvedPublic

Description

Trying to restore a hidden post on ee-flow (see URL above) after I fill in the "Restore topic?" dialog I get an errorbox "failed update". The API response in Firebug is

{"error":
{"code":"internal_api_error_Flow\\Exception\\DataPersistenceException",

"info":"Exception Caught: failed update","*":"

#0 /srv/mediawiki/extensions/Flow/includes/Data/ObjectManager.php(468): Flow\\Data\\ObjectManager->update(Object(Flow\\Model\\PostRevision))
#1 /srv/mediawiki/extensions/Flow/includes/Data/ObjectManager.php(167):
...

and the $wgDebugLogFile contains no more information.

On my local wiki, running commit 21887747b002a1cdb904b897f2a37ff9123a63ca and all DB patches applied, the same thing occurs, and again no useful information (even after applying core patch gerrit 91073). So I commented out the try-catch block in includes/Data/ObjectManager.php's update() method, and then I get

"internal_api_error_Flow\Exception\DataModelException"

info

"Exception Caught: Update not allowed on: tree_orig_user_text, rev_user_text, rev_edit_user_text"

So the DB update to Restore thinks it's changing fields it is not expected to change. The moderate-topic API request doesn't change them, it is just

{"topic":{"moderationState":"restore","reason":"A reason"}}

Oddly on both ee-flow and my local wiki, immediately before the exception, the debug log contains for the API request contains

[cookie] session_set_cookie_params: "0", "/", "", "", "1"
LocalisationCache: using store LCStoreDB
Fully initialised
User: got user 3 from cache
Connected to database 0 at localhost
User: loading options for user 3 from override cache.
User: logged in from session
Title::getRestrictionTypes: applicable restrictions to [[User talk:Spage]] are {edit,move}
DatabaseBase::query: Writes done: UPDATE flow_workflow SET workflow_namespace = '3',workflow_name = NULL,workflow_user_text = NULL WHERE workflow_id = ' �ӷ� ȱ� >hĬ'
DatabaseBase::query: Writes done: UPDATE flow_workflow SET workflow_namespace = '3',workflow_name = NULL,workflow_user_text = NULL WHERE workflow_id = ' èÓ·ð ȱú >hĬ'

Why is something blanking out some workflow's state just before restoring it.

The API response on my local wiki after removing the try catch wrapper contains:

Flow\Exception\DataModelException : [9e23d3e5] /wiki/api.php Exception from line 287 of /home/spage/projects/core/extensions/Flow/includes/Data/RevisionStorage.php:

Update not allowed on: tree_orig_user_text, rev_user_text, rev_edit_user_text

Backtrace:
#0 /home/spage/projects/core/extensions/Flow/includes/Data/ObjectManager.php(513): Flow\Data\RevisionStorage->update(array, array)
#1 /home/spage/projects/core/extensions/Flow/includes/Data/ObjectManager.php(468): Flow\Data\ObjectManager->update(Flow\Model\PostRevision)
#2 /home/spage/projects/core/extensions/Flow/includes/Data/ObjectManager.php(167): Flow\Data\ObjectManager->put(Flow\Model\PostRevision)
#3 /home/spage/projects/core/extensions/Flow/includes/Block/Topic.php(310): Flow\Data\ManagerGroup->put(Flow\Model\PostRevision)
#4 /home/spage/projects/core/extensions/Flow/includes/WorkflowLoader.php(206): Flow\Block\TopicBlock->commit()
#5 /home/spage/projects/core/extensions/Flow/includes/api/ApiFlow.php(59): Flow\WorkflowLoader->commit(Flow\Model\Workflow, array)
#6 /home/spage/projects/core/includes/api/ApiMain.php(862): ApiFlow->execute()
...


Version: master
Severity: major
URL: http://ee-flow.wmflabs.org/w/index.php?title=User_talk:Spage&workflow=050b03e8d3b7f00fc8b1fa163e68c4ac

Details

Reference
bz59752

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:24 AM
bzimport set Reference to bz59752.
bzimport added a subscriber: Unknown Object (MLST).

bingle-admin wrote:

The WMF core features team tracks this bug on Mingle card https://mingle.corp.wikimedia.org/projects/flow/cards/691, but people from the community are welcome to contribute here and in Gerrit.

bsitu wrote:

I believe this has been fixed