Last modified: 2014-01-16 01:48:49 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T61752, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 59752 - Flow: failed update (DataModelException) restoring hidden post
Flow: failed update (DataModelException) restoring hidden post
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Flow (Other open bugs)
master
All All
: High major (vote)
: ---
Assigned To: Nobody - You can work on this!
http://ee-flow.wmflabs.org/w/index.ph...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-07 03:25 UTC by spage
Modified: 2014-01-16 01:48 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description spage 2014-01-07 03:25:17 UTC
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 change #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()
...
Comment 1 Bingle 2014-01-07 03:30:33 UTC
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.
Comment 2 bsitu 2014-01-16 01:47:07 UTC
I believe this has been fixed
Comment 3 bsitu 2014-01-16 01:48:49 UTC
It was fixed in this patch: https://gerrit.wikimedia.org/r/#/c/106481/

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links