Spotted in production:
Catchable fatal error: Argument 1 passed to EditPage::displayViewSourcePage() must implement interface Content, null given in /srv/mediawiki/php-1.31.0-wmf.17/includes/EditPage.php on line 778
Spotted in production:
Catchable fatal error: Argument 1 passed to EditPage::displayViewSourcePage() must implement interface Content, null given in /srv/mediawiki/php-1.31.0-wmf.17/includes/EditPage.php on line 778
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| Disable section editing on non-current revision. | mediawiki/core | master | +41 -12 |
I can reproduce this here: https://en.wikipedia.org/w/index.php?title=Wikipedia:Sandbox&action=edit&oldid=749777530§ion=999
Conditions:
In this case, getContentObject() returns null, and displayViewSourcePage() doesn't handle that.
Change 584573 had a related patch set uploaded (by Ammarpad; owner: Ammarpad):
[mediawiki/core@master] Handle NULL result from EditPage::getContentObject
Change 584573 abandoned by Ammarpad:
[mediawiki/core@master] Disable section editing on non-current revision.
Reason:
@Ammarpad I see you abandoned the patch, has some other solution come up? Or was there a problem with the patch? I'm sorry you didn't get timely code review.
I reviewed and tested the patch. It's good to be merged. I'd like to understand why it was abandoned, though.
Change 584573 restored by Ammarpad:
[mediawiki/core@master] Disable section editing on non-current revision.
Change 584573 merged by jenkins-bot:
[mediawiki/core@master] Disable section editing on non-current revision.