Page MenuHomePhabricator

Fatal error: Call to a member function getName() on a non-object at ProofreadPage.body.php on line 709
Closed, ResolvedPublic

Description

Spotted in production:

[04-Dec-2013 15:03:54] Fatal error: Call to a member function getName() on a non-object at /usr/local/apache/common-local/php-1.23wmf5/extensions/ProofreadPage/ProofreadPage.body.php on line 709
Server: mw1130
Method: POST
URL: http://fr.wikisource.org/w/api.php
Cookie: REDACTED
Backtrace:
#0 /usr/local/apache/common-local/php-1.23wmf5/extensions/ProofreadPage/ProofreadPage.body.php(709): ProofreadPage::onAPIEditBeforeSave()
#1 [internal function]: ProofreadPage::onAPIEditBeforeSave(Object(EditPage), '<noinclude><pag...', Array)
#2 /usr/local/apache/common-local/php-1.23wmf5/includes/Hooks.php(199): call_user_func_array('ProofreadPage::...', Array)
#3 /usr/local/apache/common-local/php-1.23wmf5/includes/GlobalFunctions.php(4033): Hooks::run('APIEditBeforeSa...', Array)
#4 /usr/local/apache/common-local/php-1.23wmf5/includes/api/ApiEditPage.php(378): wfRunHooks('APIEditBeforeSa...', Array)
#5 /usr/local/apache/common-local/php-1.23wmf5/includes/api/ApiMain.php(857): ApiEditPage->execute()
#6 /usr/local/apache/common-local/php-1.23wmf5/includes/api/ApiMain.php(386): ApiMain->executeAction()
#7 /usr/local/apache/common-local/php-1.23wmf5/includes/api/ApiMain.php(357): ApiMain->executeActionWithErrorHandling()
#8 /usr/local/apache/common-local/php-1.23wmf5/api.php(73): ApiMain->execute()
#9 /usr/local/apache/common-local/w/api.php(3): require('/usr/local/apac...')
#10 {main}

A bot on fr.wikisource hit that code.


Version: master
Severity: normal

Details

Reference
bz57984

Event Timeline

bzimport raised the priority of this task from to High.
bzimport set Reference to bz57984.
bzimport added a subscriber: Unknown Object (MLST).
hashar created this task.Dec 4 2013, 3:07 PM
Tpt added a comment.Dec 4 2013, 3:13 PM

Fixed by change I270247a20d492e60116c1adf020d01bd965565be (not deployed yet)

Tpt added a comment.Dec 4 2013, 3:24 PM

I have closed it too quickly, issue not solve

hashar added a comment.Dec 4 2013, 4:35 PM

Feel free to bump ProofRead version on the wmf branches :]

Phe added a comment.Dec 4 2013, 9:03 PM

an url where the problem is visible, after the patch is live check if you don't get a fatal error with this url before closing this bug : https://fr.wikisource.org/w/index.php?title=Page:Stendhal_-_Vie_de_Napol%C3%A9on.djvu/342&action=edit

hashar added a comment.Dec 5 2013, 1:33 PM

I have deployed ProofreadPage update ( https://gerrit.wikimedia.org/r/#/c/99042/ ) but the page is still emitting a fatal error:

[05-Dec-2013 13:31:40] Fatal error: Call to a member function getName() on a non-object at /usr/local/apache/common-local/php-1.23wmf5/extensions/ProofreadPage/includes/page/ProofreadPageLevel.php on line 101
Server: mw1065
Method: GET
URL: http://fr.wikisource.org/w/index.php?title=Page:Stendhal_-_Vie_de_Napol%C3%A9on.djvu/342&action=edit
Cookie: XXXXXX
Backtrace:
#0 /usr/local/apache/common-local/php-1.23wmf5/extensions/ProofreadPage/includes/page/ProofreadPageLevel.php(101): ProofreadPageLevel::isChangeAllowed()
#1 /usr/local/apache/common-local/php-1.23wmf5/extensions/ProofreadPage/includes/page/EditProofreadPagePage.php(172): ProofreadPageLevel->isChangeAllowed(Object(ProofreadPageLevel))
#2 /usr/local/apache/common-local/php-1.23wmf5/includes/EditPage.php(2991): EditProofreadPagePage->getCheckBoxes(8, Array)
#3 /usr/local/apache/common-local/php-1.23wmf5/includes/EditPage.php(2322): EditPage->showStandardInputs()
#4 /usr/local/apache/common-local/php-1.23wmf5/includes/EditPage.php(441): EditPage->showEditForm()
#5 /usr/local/apache/common-local/php-1.23wmf5/extensions/ProofreadPage/includes/page/ProofreadPageEditAction.php(33): EditPage->edit()
#6 /usr/local/apache/common-local/php-1.23wmf5/includes/Wiki.php(441): ProofreadPageEditAction->show()
#7 /usr/local/apache/common-local/php-1.23wmf5/includes/Wiki.php(305): MediaWiki->performAction(Object(Article), Object(Title))
#8 /usr/local/apache/common-local/php-1.23wmf5/includes/Wiki.php(596): MediaWiki->performRequest()
#9 /usr/local/apache/common-local/php-1.23wmf5/includes/Wiki.php(460): MediaWiki->main()
#10 /usr/local/apache/common-local/php-1.23wmf5/index.php(49): MediaWiki->run()
#11 /usr/local/apache/common-local/w/index.php(3): require('/usr/local/apac...')
#12 {main}

Change 99386 had a related patch set uploaded by Hashar:
Fix fatal error in ProofreadPageLevel

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

Change 99386 merged by jenkins-bot:
Fix fatal error in ProofreadPageLevel

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

GOIII moved this task from Backlog to Done on the ProofreadPage board.Jun 12 2016, 3:54 AM