Last modified: 2014-04-29 21:45:06 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T42939, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40939 - [Regression] InfoAction: Call to a member function getUserText() on a non-object
[Regression] InfoAction: Call to a member function getUserText() on a non-object
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.20.x
All All
: Low blocker (vote)
: 1.20.x release
Assigned To: Nobody - You can work on this!
: code-update-regression
: 40996 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-11 00:29 UTC by Sam Reed (reedy)
Modified: 2014-04-29 21:45 UTC (History)
10 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---
legoktm.wikipedia: Backport_to_Stable-


Attachments

Description Sam Reed (reedy) 2012-10-11 00:29:25 UTC
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
Comment 1 Sumana Harihareswara 2012-10-12 19:09:07 UTC
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
Comment 2 Andre Klapper 2012-10-13 10:35:14 UTC
(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).
Comment 3 Sumana Harihareswara 2012-10-13 10:44:34 UTC
> (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)
Comment 4 Liangent 2012-10-13 10:50:38 UTC
(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 ).
Comment 5 Sam Reed (reedy) 2012-10-13 13:10:28 UTC
(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
Comment 6 Liangent 2012-10-13 13:19:07 UTC
(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.
Comment 7 Liangent 2012-10-13 13:19:54 UTC
(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
Comment 9 Krinkle 2012-10-13 15:12:39 UTC
*** Bug 40996 has been marked as a duplicate of this bug. ***
Comment 10 Alex Monk 2012-10-13 15:23:00 UTC
This is already fixed in Gerrit change #22880, it's just waiting for review.
Comment 11 Krinkle 2012-10-13 22:08:42 UTC
Since when are php fatals acceptable in the stable release channel?
Comment 12 Alex Monk 2012-10-14 11:44:14 UTC
Okay, that change is merged and this problem is fixed in master.
Comment 13 Sam Reed (reedy) 2012-10-14 23:38:51 UTC
Confirmed
Comment 14 Nemo 2013-03-04 19:33:39 UTC
(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).
Comment 15 Kunal Mehta (Legoktm) 2014-04-29 21:45:06 UTC
(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 :(

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links