Last modified: 2008-09-08 22:53:56 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 T17528, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 15528 - Query pages do not handle invalid titles properly
Query pages do not handle invalid titles properly
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Antoine "hashar" Musso (WMF)
http://en.wikipedia.org/w/index.php?t...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-08 21:21 UTC by Alex Z.
Modified: 2008-09-08 22:53 UTC (History)
3 users (show)

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


Attachments

Description Alex Z. 2008-09-08 21:21:05 UTC
The results of special:Disambiguations for enwiki, last updated 2008-09-07T06:21:55 contain an invalid title at result #472, causing a PHP fatal error:

PHP fatal error in /usr/local/apache/common-local/php-1.5/includes/Linker.php line 461:
Argument 1 passed to Linker::makeKnownLinkObj() must be an instance of Title, null given, called in /usr/local/apache/common-local/php-1.5/includes/specials/SpecialDisambiguations.php on line 90 and defined
Comment 1 Antoine "hashar" Musso (WMF) 2008-09-08 21:30:09 UTC
It looks like the article got deleted:

> select * from querycache where qc_type='Disambiguations' limit 1 OFFSET 471;
+-----------------+----------+--------------+-------------+
| qc_type         | qc_value | qc_namespace | qc_title    |
+-----------------+----------+--------------+-------------+
| Disambiguations |  2738390 |            0 | Proprietary |
+-----------------+----------+--------------+-------------+
1 row in set (0.00 sec)

> select page_namespace,page_title from page where page_id='2738390';
Empty set (0.00 sec)


Not going to run a query on archive ar_page_id since there is no index.
Comment 2 Antoine "hashar" Musso (WMF) 2008-09-08 21:36:33 UTC
Quoting MinuteElectron on IRC :
"What is happening here is that the title object is not being check for being null before being used."

Indeed :

SpecialDisambiguations.php :

function formatResult( $skin, $result ) {
    global $wgContLang;
    $title = Title::newFromId( $result->value );
    $dp = Title::makeTitle( $result->namespace, $result->title );

// Next line trigger the error. The article got deleted and we did not check
// we had a valid title :)
    $from = $skin->makeKnownLinkObj( $title, '' );
Comment 3 Alex Z. 2008-09-08 21:57:57 UTC
r40496 should prevent the fatal error in Linker.php, just not yet live on Wikimedia yet. Marking as resolved.
Comment 4 Antoine "hashar" Musso (WMF) 2008-09-08 22:01:03 UTC
Code still need to be patched to use linker::link()
Various special pages are still using the old functions.
Comment 5 Antoine "hashar" Musso (WMF) 2008-09-08 22:09:28 UTC
r40622 fix:
- Special:Disambiguations
- Special:Mostcategories
- SpecialMostlinkedtemplates

Still need to fix the other ones such as Special:Shortpages
Comment 6 Aryeh Gregor (not reading bugmail, please e-mail directly) 2008-09-08 22:53:56 UTC
Fixed in r40626.

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


Navigation
Links