[XQowzwpAAEAAAHjy0MEAAABU] 2019-06-19 12:55:44: 嚴重例外類型 "BadMethodCallException"
Description
Details
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| Fix wfLocalFile() replacement | mediawiki/core | wmf/1.34.0-wmf.10 | +1 -1 | |
| Fix wfLocalFile() replacement | mediawiki/core | master | +1 -1 |
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | Release | • mmodell | T220735 1.34.0-wmf.10 deployment blockers | ||
| Resolved | PRODUCTION ERROR | Lucas_Werkmeister_WMDE | T226102 BadMethodCallException on Commons: /includes/specials/pagers/ImageListPager.php: Call to a member function getUrl() on a non-object (boolean) |
Event Timeline
@A2093064 Can you briefly describe what you were trying to do when this error happened?
I can see it in the logs, but I don't want to describe it publicly without your permission.
@Krinkle A user posted this error message in a Facebook group. He said he can't upload files and view Special:ListFiles/His_name. These are all I know. Maybe I can ask him for his permission.
He moved "File:蔣培火墓.jpg" to "File:蔡培火墓.jpg" and got errors, then this file lost.
Now I view https://commons.wikimedia.org/wiki/Special:ListFiles/Pbdragonwang and got:
[XQpBhgpAMEoAAKmzvyEAAACH] 2019-06-19 14:07:02: Fatal exception of type "BadMethodCallException"
This patch made a change to /includes/specials/pagers/ImageListPager.php on a line that calls getUrl() https://gerrit.wikimedia.org/r/c/mediawiki/core/+/510199
[In ImageListPager.php](https://gerrit.wikimedia.org/r/c/mediawiki/core/+/510199/20/includes/specials/pagers/ImageListPager.php#b471), it replaced wfLocalFile() with $services->getRepoGroup()->findFile(), but I think that’s actually the replacement for wfFindFile(), and the correct replacement for wfLocalFile() would be $services->getRepoGroup()->getLocalRepo()->newFile(). I should’ve checked this more thoroughly in review, sorry. I’ll upload a patch.
Change 517999 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/core@master] Fix wfLocalFile() replacement
Unfortunately I can’t reproduce the bug locally, so I’m not sure if the fix works. Is it okay if I temporarily apply it on mwdebug1002 before it’s merged, or is that frowned upon?
Oh nevermind, I can’t test it on mwdebug1002 either with the train being rolled back.
Change 517999 merged by jenkins-bot:
[mediawiki/core@master] Fix wfLocalFile() replacement
Change 518013 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/core@wmf/1.34.0-wmf.10] Fix wfLocalFile() replacement
So this is provisionally fixed but we can't tell until the train rolls forward to Commons, is that right?
Change 518013 merged by jenkins-bot:
[mediawiki/core@wmf/1.34.0-wmf.10] Fix wfLocalFile() replacement
Mentioned in SAL (#wikimedia-operations) [2019-06-20T16:19:08Z] <krinkle@deploy1001> Synchronized php-1.34.0-wmf.10/includes/specials/pagers/ImageListPager.php: T226102 / rMW294500d6e1d7 (duration: 00m 58s)