Page MenuHomePhabricator

Upgrade to 1.5 did not populate image mime column
Closed, ResolvedPublic

Description

Author: njansen

Description:
After upgrading from 1.4.12 to MW 1.5.3, we found that almost all the images are no longer
displayed, and their pages are showing a warning about possible malicious code.

The script maintenance/rebuildImages.php is already used. It is looking for images in the root of
the folder images. But, the images are placed in the subfolders.

After a while we get the message: "To many users" and "to many connection".

On the internet we have read that there are more websites with this problem. They also have the
images' major_mime_type fields in the database empty.

See the test website: http://www.wereldpagina.nl/wiki2


Version: unspecified
Severity: normal
URL: http://www.wereldpagina.nl/wiki2

Details

Reference
bz4328

Event Timeline

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

robchur wrote:

If you fill in the mime type field for a known image and view it, does that work?

njansen wrote:

Yes, that works. See:

http://www.wereldpagina.nl/wiki2/index.php/Afbeelding:Isola2000vue_de_station.JPG

But first i had to change in the LocalSettings.php:

$wgHashedUploadDirectory = true (Default was false) otherwise the link would point to the folder and not to
the subfolder.

(http://www.wereldpagina.nl/wiki2/images/Isola2000vue_de_station.JPG
instead of
http://www.wereldpagina.nl/wiki2/images/9/93/Isola2000vue_de_station.JPG)

zigger wrote:

(set version based on report with 1.5.2 at
http://mail.wikipedia.org/pipermail/mediawiki-l/2005-December/008743.html )
(dropped severity as work-around provided)
(re-opened because upgrade or doco bug presumably still exists)

njansen wrote:

Manualy filling in the mime type field and the format for a known image works indeed. But that is only a
solution for a small amount of Images.

The bug is severe if your website has a lot of Images.

njansen wrote:

Manualy filling in the mime type field and the format for a known image works indeed. But that is only a
solution for a small amount of Images.

The bug is severe if your website has a lot of Images.

robchur wrote:

Update: To correct this problem, run the rebuildImages.php maintenance script
from the command line.

Marking bug as FIXED, rebuildImages.php should work fine with $wgHashedUploadDirectory correctly set and 1.5 is out of support since a while.