While filing bug 72993 I let the "Scenario: Deleting a topic" delete the top-most topic with KEEP_BROWSER_OPEN=true. I returned to this browser window an hour or more later and clicked the Undo button in the
[This topic has been deleted. _Undo_]
flow-moderated-topic-title.
Nothing happened. I retried with the developer console Net tab open, and the POST request returned status 200 and 20 empty bytes. According to cURL it's responding with 1f 8b 08 00 00 00 00 00 00 03 03 00 00 00 00 00 00 00 00 00
I think what happened is the Selenium user had been logged out due to session timeout (the QA tests do not check [ ] Keep me logged in when logging in), and then the attempt to report the failure blows up. ee-flow's Apache log has *two* errors for the one request (below)
- Undefined property: Flow\\Block\\TopicBlock::$user in getDisallowedErrorMessage()
- $this->user->isAllowed() call in getDisallowedErrorMessage() when there's no user in /srv/mediawiki/extensions/Flow/includes/Block/Topic.php
both stemming from the user being logged out. I don't even see a $user member variable. Line 754 arose from mlitn's "Show more descriptive error message for insufficient permissions"
When an anonymous or logged-out user tries to view this deleted topic http://ee-flow.wmflabs.org/wiki/Topic:S5i6a0emy49f9668 , they see a blank HTML page and the log has a similar error. I'll file that separately.
Here are the two errors logged when I repeated the undo POST request with curl, basically 'action=flow&format=json&submodule=moderate-topic&page=Topic%3AS5i6a0emy49f9668&mtreason=%3Cflow-topic-undo-delete%3E&mtmoderationState=undelete&token=%2B%5C' Note the wrong-looking token.
All lines start with "[Wed Nov 05 04:41:39 2014] [error] [client 10.68.16.65] PHP" and end with ", referer: http://ee-flow.wmflabs.org/wiki/DUMMYCURL"
Notice: Undefined property: Flow\\Block\\TopicBlock::$user in /srv/mediawiki/extensions/Flow/includes/Block/Topic.php on line 754
Stack trace:
- {main}() /srv/mediawiki/api.php:0
- ApiMain->execute() /srv/mediawiki/api.php:85
- ApiMain->executeActionWithErrorHandling() /srv/mediawiki/includes/api/ApiMain.php:362
- ApiMain->executeAction() /srv/mediawiki/includes/api/ApiMain.php:391
- ApiFlow->execute() /srv/mediawiki/includes/api/ApiMain.php:952
- ApiFlowBasePost->execute() /srv/mediawiki/extensions/Flow/includes/api/ApiFlow.php:81
- Flow\\WorkflowLoader->handleSubmit() /srv/mediawiki/extensions/Flow/includes/api/ApiFlowBasePost.php:19
- Flow\\SubmissionHandler->handleSubmit() /srv/mediawiki/extensions/Flow/includes/WorkflowLoader.php:63
- Flow\\Block\\AbstractBlock->onSubmit() /srv/mediawiki/extensions/Flow/includes/SubmissionHandler.php:104
- Flow\\Block\\TopicBlock->validate() /srv/mediawiki/extensions/Flow/includes/Block/Block.php:194
- Flow\\Block\\TopicBlock->loadTopicTitle() /srv/mediawiki/extensions/Flow/includes/Block/Topic.php:103
- Flow\\Block\\TopicBlock->getDisallowedErrorMessage() /srv/mediawiki/extensions/Flow/includes/Block/Topic.php:733
and immediately afterwards
Fatal error: Call to a member function isAllowed() on a non-object in /srv/mediawiki/extensions/Flow/includes/Block/Topic.php on line 754
Stack trace:
(identical)
Version: master
Severity: normal