Page MenuHomePhabricator

Fix SecurePoll_BallotStatus for Status/StatusValue changes
Closed, ResolvedPublic

Description

SecurePoll_BallotStatus has a constructor that does not call parent::__construct(). This breaks badly with the new Status/StatusValue changes in MediaWiki core.

Event Timeline

bd808 raised the priority of this task from to Unbreak Now!.
bd808 updated the task description. (Show Details)
bd808 added subscribers: bd808, aaron, Legoktm, Anomie.
gerritbot added a subscriber: gerritbot.

Change 190486 had a related patch set uploaded (by Anomie):
Call parent::__construct() from SecurePoll_BallotStatus

https://gerrit.wikimedia.org/r/190486

Patch-For-Review

Change 190486 merged by jenkins-bot:
Call parent::__construct() from SecurePoll_BallotStatus

https://gerrit.wikimedia.org/r/190486

Change 190770 had a related patch set uploaded (by BryanDavis):
Call parent::__construct() from SecurePoll_BallotStatus

https://gerrit.wikimedia.org/r/190770

Patch-For-Review

@Deskana asked for this fix to be backported to the 1.25wmf17 production branch which was the first branch to include the breaking change to the Status class.

Is T89425 a dup / related?

I merged this in as a dup because it sounded the same, but votewiki is currently running 1.25wmf16 and the breaking core change wasn't introduced until 1.25wmf17. It may require more investigation.

Change 190770 merged by BryanDavis:
Call parent::__construct() from SecurePoll_BallotStatus

https://gerrit.wikimedia.org/r/190770

Change 190834 had a related patch set uploaded (by BryanDavis):
Backport SecurePoll_BallotStatus fix for SecurePoll

https://gerrit.wikimedia.org/r/190834

Patch-For-Review

Change 190834 merged by jenkins-bot:
Backport SecurePoll_BallotStatus fix for SecurePoll

https://gerrit.wikimedia.org/r/190834

Fix should be verified by @Jalexander: he needs to try to create a poll on votewiki. If it works, this patch fixed the problem!

Fix should be verified by @Jalexander: he needs to try to create a poll on votewiki. If it works, this patch fixed the problem!

So at least as far as T89425 not fixed yet :-/ When attempting to create a BoardElection poll on voteWiki (I know it was only released on test wikis so this was the control essentially) I got the same error we saw last week "Exception encountered, of type "BadMethodCallException" when I tried to create on testWiki we got the same error but with backtrace. It's possible that that's because the poll creation has to iterate through on non patched wikis as well but I don't think that will have the same issue.

Exception encountered, of type "BadMethodCallException"
[1681fee7] /wiki/Special:SecurePoll/create BadMethodCallException from line 425 of /srv/mediawiki/php-1.25wmf17/extensions/SecurePoll/includes/pages/CreatePage.php: Call to a member function getId() on a non-object (boolean)
Backtrace:
#0 /srv/mediawiki/php-1.25wmf17/includes/htmlform/HTMLForm.php(544): SecurePoll_CreatePage->processInput(array, HTMLForm)
#1 /srv/mediawiki/php-1.25wmf17/includes/htmlform/HTMLForm.php(467): HTMLForm->trySubmit()
#2 /srv/mediawiki/php-1.25wmf17/extensions/SecurePoll/includes/pages/CreatePage.php(346): HTMLForm->tryAuthorizedSubmit()
#3 /srv/mediawiki/php-1.25wmf17/extensions/SecurePoll/includes/main/Base.php(68): SecurePoll_CreatePage->execute(array)
#4 /srv/mediawiki/php-1.25wmf17/includes/specialpage/SpecialPage.php(383): SecurePoll_BasePage->execute(string)
#5 /srv/mediawiki/php-1.25wmf17/includes/specialpage/SpecialPageFactory.php(581): SpecialPage->run(string)
#6 /srv/mediawiki/php-1.25wmf17/includes/MediaWiki.php(270): SpecialPageFactory::executePath(Title, RequestContext)
#7 /srv/mediawiki/php-1.25wmf17/includes/MediaWiki.php(560): MediaWiki->performRequest()
#8 /srv/mediawiki/php-1.25wmf17/includes/MediaWiki.php(424): MediaWiki->main()
#9 /srv/mediawiki/php-1.25wmf17/index.php(46): MediaWiki->run()
#10 /srv/mediawiki/w/index.php(3): include(string)
#11 {main}

Now that we see the stacktrace, T89425 looks like a different issue.

Anomie set Security to None.