Last modified: 2010-11-12 13:32:15 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 17751 - clean up null filenames from database by update.php
clean up null filenames from database by update.php
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.15.x
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 16660
  Show dependency treegraph
 
Reported: 2009-03-02 07:09 UTC by Dan Jacobson
Modified: 2010-11-12 13:32 UTC (History)
6 users (show)

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


Attachments
still must make multilingual (411 bytes, patch)
2009-03-05 09:51 UTC, Dan Jacobson
Details

Description Dan Jacobson 2009-03-02 07:09:17 UTC
In SpecialWantedpages.php:

 $tsafe = htmlspecialchars( $result->title );
 return "Invalid title in result set; {$tsafe}";

1. make sure all lines like these are translated.

2. print out some mention of what should be done. E.g., for the above URI one just sees

2104. 分類:新光三越(1) ‎(1 link)
2105. 分類:玩具反斗城 ‎(1 link)
2106. Invalid title in result set;
2107. 分類:仁化村 ‎(1 link)
2108. 分類:交通隊 ‎(1 link)

And doesn't know how to proceed to alleviate the problem.
Perhaps it was expected some partial name clue would be always printed.
Comment 1 Niklas Laxström 2009-03-02 07:35:59 UTC
Looks like that in this case the title contains some invisible characters, which are, well, hard to show.
Comment 2 Dan Jacobson 2009-03-05 09:51:30 UTC
Created attachment 5888 [details]
still must make multilingual

OK, this patch will improve the feedback to the user.

However, it is still English only.

And in my case it revealed the title is just ""! And
  return "-".strlen($result->title) ."-";
just gives "-0-".

How could such an item get into the results? Is the problem with
SpecialWantedpages.php or does it indicate a deeper problem...? I
looked at SpecialWantedpages.php but it is too complex for me.
Comment 3 Chad H. 2009-03-05 15:38:48 UTC
Localized the message in r48061.

Ideally, an invalid title should have never made it into the database in the first place, as it should be validated prior to editing.
Comment 4 Dan Jacobson 2009-03-11 12:44:37 UTC
OK, found the BIG BUG. Big because it corrupts the database, in my eyes.

You know internal anchor links, like [[#Bla]], [[#中文]]?

Well, the former is innocuous. However, it turns out the latter,
because it is Chinese, causes a (empty!) entry to be made in
wiki_pagelinks!

$ echo "SELECT * FROM wiki_pagelinks WHERE pl_title = '';"|mysql mydb
pl_from	pl_namespace	pl_title
22	0

(So that's why Wantedpages gets junk!)
(Happens at least on my $wgLanguageCode='zh-tw' wikis. Didn't test 'en').
Comment 5 Roan Kattouw 2009-03-11 13:54:33 UTC
(In reply to comment #4)
> OK, found the BIG BUG. Big because it corrupts the database, in my eyes.
> 
> You know internal anchor links, like [[#Bla]], [[#中文]]?
> 
> Well, the former is innocuous. However, it turns out the latter,
> because it is Chinese, causes a (empty!) entry to be made in
> wiki_pagelinks!
> 
> $ echo "SELECT * FROM wiki_pagelinks WHERE pl_title = '';"|mysql mydb
> pl_from pl_namespace    pl_title
> 22      0

Doesn't that make this bug a duplicate of bug 17713?
Comment 6 Dan Jacobson 2009-03-11 21:53:38 UTC

*** This bug has been marked as a duplicate of bug 17713 ***
Comment 7 Dan Jacobson 2009-03-11 23:44:39 UTC
The problem now is these null entries are still left in the database even through runs of update.php.

So even though no new null entries will be added, the ones that got into the database remain, so bug reports will come in from users who see the weird side effects.

Therefore update.php needs to clean them up.
Comment 8 Dan Jacobson 2009-03-11 23:46:45 UTC
I.e., without cleaning them up via update.php, each page with the null entries must be "null edited" by hand to correct the problem...
But of course the problem is not with the page at all.
Comment 9 Laurence 'GreenReaper' Parry 2009-03-13 02:09:44 UTC
Happening at WikiFur with our Spanish language version. As I recall, the null entries went away when we removed the Cite extension (or didn't use references). Previously, this resulted in a crash, now just this message.
Comment 10 Dan Jacobson 2009-03-14 01:14:29 UTC
As a workaround, the administrator manually running maintenance/refreshLinks.php apparently fixes them, though the output doesn't indicate such.
Comment 11 Roan Kattouw 2009-12-24 12:06:41 UTC
You can remove them from the database by running the SQL query DELETE FROM pagelinks WHERE pl_namespace=0 AND pl_title=''; using maintenance/sql.php , but they'll also disappear over time as the wiki is being edited. For these reasons I'm not sure this is worth an update script.
Comment 12 Roan Kattouw 2009-12-24 12:26:33 UTC
(In reply to comment #11)
> You can remove them from the database by running the SQL query DELETE FROM
> pagelinks WHERE pl_namespace=0 AND pl_title=''; using maintenance/sql.php , but
> they'll also disappear over time as the wiki is being edited. For these reasons
> I'm not sure this is worth an update script.
> 

I have done this cleanup on all Wikimedia wikis.

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


Navigation
Links