Page MenuHomePhabricator

Table updaters should warn (and offer deletion) of empty image.img_name or image.img_size rows
Open, MediumPublicFeature

Description

Recently I found a small problem after upgrading a very old version to Mediawiki 1.15.1, this problem being entered as https://bugzilla.wikimedia.org/show_bug.cgi?id=22227 (SpecialListfiles throws fatal error on emtpy file names).

But the underlying reason was a failed file upload some years ago which apparently resulted in a "upload zombie" entry in table image (the failing upload is not topic of this bugzilla as such. We all know, this should not happen, but happened for the one or other reason now and then in older Mediawiki versions.)

In my case, I found that the upload date and uploader's name were present and correct, but I found image.img_name == '' and image.img_size==0, which make no sense and puzzles at least SpecialListfiles.php (try to sort the table by names -> fatal error).

To offer users a safe migration in case they have previously unknown "upload zombie(s)" in their image table, I suggest:

--> to add a check in updaters.inc to print a warning for such cases. It will be needed to add a quick plausibility check and to give the updater a link to delete such zombies when migrate-installing a wiki, or when maintaining database.


Version: 1.16.x
Severity: enhancement
URL: http://svn.wikimedia.org/viewvc/mediawiki?view=rev&revision=60470

Details

Reference
bz22231

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:53 PM
bzimport set Reference to bz22231.
bzimport added a subscriber: Unknown Object (MLST).

sumanah wrote:

Removing the "need-review" keyword, since there is no patch here awaiting code review.

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 12:24 PM
Aklapper removed a subscriber: wikibugs-l-list.