https://bugzilla.wikimedia.org/show_bug.cgi?id=73003
Bug ID: 73003
Summary: Flow: clicking Undo of a moderation action after
you're logged out silently fails with fatal error
Product: MediaWiki extensions
Version: master
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Flow
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected]
Web browser: ---
Mobile Platform: ---
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)
1. Undefined property: Flow\\Block\\TopicBlock::$user in
getDisallowedErrorMessage()
2. $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:
1. {main}() /srv/mediawiki/api.php:0
2. ApiMain->execute() /srv/mediawiki/api.php:85
3. ApiMain->executeActionWithErrorHandling()
/srv/mediawiki/includes/api/ApiMain.php:362
4. ApiMain->executeAction() /srv/mediawiki/includes/api/ApiMain.php:391
5. ApiFlow->execute() /srv/mediawiki/includes/api/ApiMain.php:952
6. ApiFlowBasePost->execute()
/srv/mediawiki/extensions/Flow/includes/api/ApiFlow.php:81
7. Flow\\WorkflowLoader->handleSubmit()
/srv/mediawiki/extensions/Flow/includes/api/ApiFlowBasePost.php:19
8. Flow\\SubmissionHandler->handleSubmit()
/srv/mediawiki/extensions/Flow/includes/WorkflowLoader.php:63
9. Flow\\Block\\AbstractBlock->onSubmit()
/srv/mediawiki/extensions/Flow/includes/SubmissionHandler.php:104
10. Flow\\Block\\TopicBlock->validate()
/srv/mediawiki/extensions/Flow/includes/Block/Block.php:194
11. Flow\\Block\\TopicBlock->loadTopicTitle()
/srv/mediawiki/extensions/Flow/includes/Block/Topic.php:103
12. 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)
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l