Page MenuHomePhabricator

EditPage.php: Call to a member function getModel() on null
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

MediaWiki version: 1.35.0-wmf.4

message
Call to a member function getModel() on null

Impact

Users are consistently unable to edit some pages on the site.

When they try, the server responds with an HTTP 500 Internal Server Error due to the PHP runtime encountering a fatal error from MediaWiki.

Notes

This seems to affect some of the same pages that cannot even be viewed, as reported in T203075. However the exception is different so reporting separately for now.

Details

Request ID
XcMe1ApAIDEAAGtw8voAAABT
Request URL
/w/index.php?title=Franjeva%C4%8Dki_samostan_Sv._Antuna_Padovanskog_u_Koprivnici&action=edit
Stack Trace
exception.trace
#0 /includes/EditPage.php(687): EditPage->initialiseForm()
#1 /includes/actions/EditAction.php(60): EditPage->edit()
#2 /includes/MediaWiki.php(514): EditAction->show()
#3 /includes/MediaWiki.php(304): MediaWiki->performAction(Article, Title)
#4 /includes/MediaWiki.php(967): MediaWiki->performRequest()
#5 /includes/MediaWiki.php(530): MediaWiki->main()
#6 /index.php(44): MediaWiki->run()
#7 /srv/mediawiki/w/index.php(3): require(string)
#8 {main}

Event Timeline

This bug report is lacking the line number where the error actually occurred, which makes it harder to investigate (spoiler: 1147). Also it's not clear which wiki the URL /w/index.php?title=Franjeva%C4%8Dki_samostan_Sv._Antuna_Padovanskog_u_Koprivnici&action=edit applies to (spoiler: hr.wikipedia.org).

Looks like rMW6906a7728cf5: Add UnknownContentHandler. didn't take into account that getContentObject() can return null as well as false. Seems like Phan should have caught that.

Change 549569 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/core@master] EditPage: Improve handling of missing revision contents

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

Change 549569 merged by jenkins-bot:
[mediawiki/core@master] EditPage: Improve handling of missing revision contents

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

Anomie claimed this task.