https://bugzilla.wikimedia.org/show_bug.cgi?id=59752

       Web browser: ---
            Bug ID: 59752
           Summary: Flow: failed update (DataModelException) restoring
                    hidden post
           Product: MediaWiki extensions
           Version: master
          Hardware: All
               URL: http://ee-flow.wmflabs.org/w/index.php?title=User_talk
                    :Spage&workflow=050b03e8d3b7f00fc8b1fa163e68c4ac
                OS: All
            Status: NEW
          Severity: major
          Priority: Unprioritized
         Component: Flow
          Assignee: wikibugs-l@lists.wikimedia.org
          Reporter: sp...@wikimedia.org
                CC: ebernhard...@wikimedia.org, oke...@wikimedia.org,
                    pandiculat...@gmail.com, sp...@wikimedia.org
    Classification: Unclassified
   Mobile Platform: ---

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()
...

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to