Page MenuHomePhabricator

Ability to create blocks broken
Closed, ResolvedPublic

Description

What is the problem?

Attempting to submit a block on https://en.wikipedia.beta.wmflabs.org/wiki/Special:Block I get:

PHP fatal error:
Argument 3 passed to EventFactory::createUserBlockChangeEvent() must be an instance of Block, null given

Does not happen on test or my local VM (which is the same version of core as beta).

Right now beta is MediaWiki 1.33.0-alpha (b0a3dd3) 16:36, 31 March 2019.

Someone may also want to check the appropriate logs for around 18:30-18:40 31st March UTC, which is when I was having this issue.

Steps to reproduce problem
  1. https://en.wikipedia.beta.wmflabs.org/wiki/Special:Block
  2. Submit any sort of block against any user
Environment

Operating system: Debian 8 GNU/Linux
Browser: Firefox 60
Wiki(s): https://en.wikipedia.beta.wmflabs.org

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 31 2019, 6:48 PM
Restricted Application added a subscriber: MGChecker. · View Herald TranscriptMar 31 2019, 6:48 PM
MarcoAurelio added a subscriber: MarcoAurelio.

I see something at https://kibana4.wmflabs.org/goto/3a38e83ee655fbc97beca6c53679d431

Catchable fatal error: Argument 3 passed to EventFactory::createUserBlockChangeEvent() must be an instance of Block, null given in /srv/mediawiki/php-master/extensions/EventBus/includes/EventBusHooks.php on line 371

and

[Sun Mar 31 11:48:14 2019] [hphp] [20620:7fe82c3ff700:4904:000001] [] \nCatchable fatal error: Argument 3 passed to EventFactory::createUserBlockChangeEvent() must be an instance of Block, null given in /srv/mediawiki/php-master/extensions/EventBus/includes/EventBusHooks.php on line 371
Restricted Application added a project: Analytics. · View Herald TranscriptMar 31 2019, 7:09 PM

needs to be evaluated as potential train blocker

needs to be evaluated as potential train blocker

Yup. I was about to add it as a blocker :) Better safe than sorry. Blocking blocks means no-antivandalism measures which would be pretty bad.

yes, no blocking = no deploy. just not fully sure of the circumstances under which blocking does/does not work yet

Logstash mentions Event-Platform but it might also be MediaWiki-User-management (Special:Block) not being updated to work with the EventFactory thing. I'm not sure if I should be adding both tags.

Krenair triaged this task as Unbreak Now! priority.Mar 31 2019, 7:18 PM

does not appear tied to PHP_ENGINE cookie, setting UBN

Restricted Application added subscribers: Liuxinyu970226, TerraCodes. · View Herald TranscriptMar 31 2019, 7:18 PM

Change 500246 had a related patch set uploaded (by Alex Monk; owner: Alex Monk):
[mediawiki/extensions/EventBus@master] Follow-up I7b65e5e3: previousBlock can be null

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

Krenair claimed this task.Mar 31 2019, 7:32 PM

I've dug into it and I think all *new* blocks on wikis where EventBus is enabled (so, everywhere but wikitech) are broken. Amending existing blocks should still work but I'm pretty sure that's a rare case.

Krenair renamed this task from PHP fatal error submitting block on Beta to Ability to create blocks broken.Mar 31 2019, 7:35 PM

Change 500247 had a related patch set uploaded (by Ppchelko; owner: Ppchelko):
[mediawiki/extensions/EventBus@master] Provide a unit test for null oldBlock.

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

Thank you for catching this early and sorry for this.

Change 500246 merged by jenkins-bot:
[mediawiki/extensions/EventBus@master] Follow-up I7b65e5e3: previousBlock can be null

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

Krenair closed this task as Resolved.Apr 1 2019, 10:38 AM

works, thanks all

Change 500247 merged by Ppchelko:
[mediawiki/extensions/EventBus@master] Provide a unit test for null oldBlock.

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