Page MenuHomePhabricator

[Regression] InfoAction: Call to a member function getUserText() on a non-object
Closed, ResolvedPublic

Description

2 Fatal error: Call to a member function getUserText() on a non-object in /usr/local/apache/common-local/php-1.21wmf1/includes/actions/InfoAction.php on line 212

Code seems to have "gone" in master, so a backport might be all that's needed.. Just logging this before going offline, so not looking for it now


Version: 1.20.x
Severity: blocker
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=39688

Details

Reference
bz40939

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:12 AM
bzimport set Reference to bz40939.
bzimport added a subscriber: Unknown Object (MLST).

sumanah wrote:

Sam thinks this isn't high-priority:

<Reedy> sumanah: not very. I think it's already fixed in trunk, and it's not occuring too frequently

(In reply to comment #1)

<Reedy> and it's not occuring too frequently

Seems to happen for any non-existing page, like
http://en.wikipedia.org/wiki/Hrrrrr?action=info
http://www.mediawiki.org/wiki/Hrrrrr?action=info

http://commons.wikimedia.beta.wmflabs.org/wiki/foo?action=info is just white.

Bug 40996 sounds very similar. Wondering whether to set a tentative Target Milestone (but I'm clueless whether 1.20 or 1.21).

sumanah wrote:

(In reply to comment #1)

Bug 40996 sounds very similar. Wondering whether to set a tentative Target
Milestone (but I'm clueless whether 1.20 or 1.21).

If the fix needs to be backported because it's that urgent or security-related, 1.20. Otherwise, 1.21.(In reply to comment #2)

(In reply to comment #2)

Bug 40996 sounds very similar. Wondering whether to set a tentative Target
Milestone (but I'm clueless whether 1.20 or 1.21).

From above talk I see the related code in InfoAction was rewritten and new code introduced bug 40996 and it has the same root cause.

When a page doesn't exist, its $firstRev is null but both old and new code try to get its author: in old code it calls $firstRev->getUserText() and in new code it calls Linker::revUserTools( $firstRev ).

(In reply to comment #4)

(In reply to comment #2)

Bug 40996 sounds very similar. Wondering whether to set a tentative Target
Milestone (but I'm clueless whether 1.20 or 1.21).

From above talk I see the related code in InfoAction was rewritten and new code
introduced bug 40996 and it has the same root cause.

When a page doesn't exist, its $firstRev is null but both old and new code try
to get its author: in old code it calls $firstRev->getUserText() and in new
code it calls Linker::revUserTools( $firstRev ).

Indeed. As I said originally, the code is "gone" in master, so it's more of a backport needed.

Having said that, trying it locally on a non existant page:

Fatal error: Call to a member function isDeleted() on a non-object in /var/www/wiki/mediawiki/core/includes/Linker.php on line 1218 Call Stack: 0.0013 646280 1. {main}() /var/www/wiki/mediawiki/core/index.php:0 0.2353 19940056 2. MediaWiki->run() /var/www/wiki/mediawiki/core/index.php:59 0.2354 19940056 3. MediaWiki->main() /var/www/wiki/mediawiki/core/includes/Wiki.php:447 0.2614 22619272 4. MediaWiki->performRequest() /var/www/wiki/mediawiki/core/includes/Wiki.php:554 0.2887 25522248 5. MediaWiki->performAction() /var/www/wiki/mediawiki/core/includes/Wiki.php:305 0.2904 25640368 6. FormlessAction->show() /var/www/wiki/mediawiki/core/includes/Wiki.php:428 0.3962 35517104 7. InfoAction->onView() /var/www/wiki/mediawiki/core/includes/Action.php:541 0.4011 35778216 8. InfoAction->pageInfo() /var/www/wiki/mediawiki/core/includes/actions/InfoAction.php:75 0.4802 38876608 9. Linker::revUserTools() /var/www/wiki/mediawiki/core/includes/actions/InfoAction.php:292

(In reply to comment #5)

(In reply to comment #4)

(In reply to comment #2)

Bug 40996 sounds very similar. Wondering whether to set a tentative Target
Milestone (but I'm clueless whether 1.20 or 1.21).

From above talk I see the related code in InfoAction was rewritten and new code
introduced bug 40996 and it has the same root cause.

When a page doesn't exist, its $firstRev is null but both old and new code try
to get its author: in old code it calls $firstRev->getUserText() and in new
code it calls Linker::revUserTools( $firstRev ).

Indeed. As I said originally, the code is "gone" in master, so it's more of a
backport needed.

We have to fix bug 40996 first to get something to backport.

(In reply to comment #6)

(In reply to comment #5)

(In reply to comment #4)

(In reply to comment #2)

Bug 40996 sounds very similar. Wondering whether to set a tentative Target
Milestone (but I'm clueless whether 1.20 or 1.21).

From above talk I see the related code in InfoAction was rewritten and new code
introduced bug 40996 and it has the same root cause.

When a page doesn't exist, its $firstRev is null but both old and new code try
to get its author: in old code it calls $firstRev->getUserText() and in new
code it calls Linker::revUserTools( $firstRev ).

Indeed. As I said originally, the code is "gone" in master, so it's more of a
backport needed.

We have to fix bug 40996 first to get something to backport.

*get something working

  • Bug 40996 has been marked as a duplicate of this bug. ***

This is already fixed in Gerrit change 22880, it's just waiting for review.

Since when are php fatals acceptable in the stable release channel?

Okay, that change is merged and this problem is fixed in master.

(In reply to comment #11)

Since when are php fatals acceptable in the stable release channel?

Still has to be backported to 1.20, if needed (for 1.20.4; it didn't make it to 1.20.3).

(In reply to Nemo from comment #14)

Still has to be backported to 1.20, if needed (for 1.20.4; it didn't make it
to 1.20.3).

This probably should have been backported, but 1.20 is no longer supported :(