Last modified: 2010-05-15 15:59:49 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 T13285, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 11285 - Improper handling of invalid titles in some special pages
Improper handling of invalid titles in some special pages
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.11.x
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch-need-review
Depends on:
Blocks: code_quality
  Show dependency treegraph
 
Reported: 2007-09-11 10:27 UTC by Barns
Modified: 2010-05-15 15:59 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
proposed patch (13.10 KB, patch)
2008-03-12 23:09 UTC, Nicolas Dumazet
Details
proposed patch, tabs instead of spaces (12.85 KB, patch)
2008-03-13 07:23 UTC, Nicolas Dumazet
Details

Description Barns 2007-09-11 10:27:39 UTC
Just upgraded to 1.11 from 1.10.
When going to some special pages, I get the following error

Call to a member function getPrefixedText() on a non-object in D:\\websites\\mediawiki\\includes\\SpecialFewestrevisions.php on line 47, referer: http://localhost/wiki/index.php?title=Special:Specialpages

This also happens in SpecialFewestrevisions.php on line 47
and PageQueryPage.php on line 22
Comment 1 Barns 2007-09-11 13:42:49 UTC
*MW 1.11.0 (upgraded from 1.10.1)
*PHP 5.2.1
*Windows 2003
*XCache 1.2.0 ($wgMainCacheType	= "CACHE_ACCEL")
Comment 2 Barns 2007-09-12 09:11:12 UTC
OK, I debugged that.
I had a page in MW 1.9.2 that got no title.

Since MW 1.10.0, the following pages no longer worked even though it worked in 1.9.X:
-Dead-end pages
-Orphaned pages
-Pages without language links
-Uncategorized pages

I fixed that by running cleanupTitles.php (I had to do a Control-C after 5 minutes as the script wouldn't end, but it worked still).
Comment 3 Rob Church 2007-09-12 11:33:31 UTC
Improper handling of invalid titles in special pages constitutes a bug - normal procedure is to escape the page_title equivalent and present it to the user in plain text with a short message.
Comment 4 Barns 2007-09-12 12:17:55 UTC
Ok: to reproduce, put a "null" on any row in page.page_title.
The page on which you do that should of course qualify as dead-end or orphaned page, etc....

On MW 1.9, I got a strange list where item 1 & 2 would merge, the rest being normal.
On MW 1.10 & 1.11, I got above error message.
Comment 5 Nicolas Dumazet 2008-03-12 23:09:01 UTC
Created attachment 4707 [details]
proposed patch

QueryPage.php states, for makeTitle & makeTitleSafe : 
// @return Title the new object, or NULL on an error

And actually, the return value of these functions was never really being checked in any of these Specialpages.
Comment 6 Nicolas Dumazet 2008-03-13 07:23:19 UTC
Created attachment 4708 [details]
proposed patch, tabs instead of spaces

Oops, was my first patch here; apparently you'd prefer tabs, here is a patch using tabs ;)
Comment 7 MZMcBride 2008-10-06 11:41:54 UTC
Fixed in r41673, r41677, and r41726 by Mr.Z-man.

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


Navigation
Links