Page MenuHomePhabricator

Fatal error: Argument 1 passed to MessageHandle::__construct() must be an instance of Title, null given
Closed, ResolvedPublic

Description

fatal error: Argument 1 passed to MessageHandle::__construct() must be an instance of Title, null given
in /srv/mediawiki/php-1.28.0-wmf.14/extensions/Translate/utils/MessageHandle.php on line 37

https://github.com/wikimedia/mediawiki-extensions-Translate/blob/wmf/1.28.0-wmf.14/utils/MessageHandle.php#L35

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 16 2016, 12:34 AM
Nikerabbit triaged this task as Normal priority.Aug 16 2016, 5:37 AM

This is super frustrating. The error message does not specify anything about the caller and there is no backtrace in logstash. In other words the only thing I can do is to remove the typehint, patch in a manual check and throw an exception with a backtrace.

Only clue is that it became more common on the 10th, so should check new changes that went into last weeks branch.

git diff origin/wmf/1.28.0-wmf.3..origin/wmf/1.28.0-wmf.4 reveals no likely suspects. Timing might just be a coincidence.

git diff origin/wmf/1.28.0-wmf.3..origin/wmf/1.28.0-wmf.4 reveals no likely suspects. Timing might just be a coincidence.

That's the wrong version numbers. It's wmf.13 and wmf.14. https://gerrit.wikimedia.org/r/#/c/303372/4/TranslateHooks.php got introduced in wmf.14 so I guess it's related to that although the doc says it will be a Title object.

Change 304972 had a related patch set uploaded (by Nikerabbit):
MessageHandle: add debugging for bug T143073

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

Change 304973 had a related patch set uploaded (by Glaisher):
Check for null $title in TranslateHooks::onAbuseFilterFilterAction

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

@Glaisher ah that makes sense, but we still have no idea who calls AbuseFilter filterAction with null title, so the debugging should be useful.

Change 304972 abandoned by Nikerabbit:
MessageHandle: add debugging for bug T143073

Reason:
See https://gerrit.wikimedia.org/r/304973

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

Change 304973 merged by jenkins-bot:
Guard against null $title in TranslateHooks::onAbuseFilterFilterAction

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

Change 305801 had a related patch set uploaded (by Glaisher):
Enable T143073 debug log channel

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

Glaisher reopened this task as Open.Aug 20 2016, 5:32 PM

Uh.. how did that happen??

Done from Translate's side, but leaving open for now.

Change 305801 merged by jenkins-bot:
Enable T143073 debug log channel

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

Mentioned in SAL [2016-08-23T13:16:18Z] <hashar@tin> Synchronized wmf-config/InitialiseSettings.php: Enable T143073 debug log channel (duration: 02m 19s)

Arrbee closed this task as Resolved.Aug 30 2016, 7:14 AM

Debug log says:

Got non-Title in AbuseFilterHooks::onUploadStashFile/AbuseFilterHooks::filterUpload/AbuseFilter::filterAction/Hooks::run/TranslateHooks::onAbuseFilterFilterAction

Can file a new task for fixing that.

Change 362094 had a related patch set uploaded (by Chad; owner: Chad):
[operations/mediawiki-config@master] Revert "Enable T143073 debug log channel"

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

Change 362094 abandoned by Chad:
Revert "Enable T143073 debug log channel"

Reason:
This one still seems to log from time to time

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