[Mediawiki-l] Only partial success importing images using "rebuildImages.php"

Ken McDonald ken at pixologic.com
Thu May 18 20:49:31 UTC 2006


If I figure out the full magical incantation, I'll post it :-), for the 
time being I'll leave off sacrificing and burning the black rooster. 
(Them thing's good eatin')

Basically, one has to make the change in LocalSettings.php as noted, 
place all of the images to be included at the _top level_ of the 
'images' subdir, and then run "php rebuildImages.php --missing". This 
appears to load all of the images in the top level of "images" into the 
database.

The problem is that links to these images sometimes, but not always, 
work. This may partially depend on whether the link is added before or 
after the image is added to the database, but I haven't been able to 
establish any definite link. Basically, I've seen three different types 
of behavior:

1) Link works fine.
2) Link points to file of MIME type image/jpg (or whatever it is), but 
there is a message something like "no log entry", and the image does not 
appear on the page, just the link.
3) Link does not point to anything (i.e. points to empty page).

Some of my image names contain "__" (double underscores), and all of 
them contain single underscores; I've tried getting rid of the 
underscores, but again, that does not seem to have an effect, and the 
documentation for MW indicates that the _ character has no special 
meaning (though it normally appears as " " in link names).

So I guess I'm going to have to explore the other scripts Rob mentioned, 
and possibly other approaches. We want to have this site up by the 29th, 
so want to have it available for internal testing in the next five days 
or so, so time is getting tight. I confess, I hadn't expected the task 
to be quite so difficult. (I'm converting from MoinMoin, and while it 
doesn't have nearly the power of MW, there's one thing I'll say about a 
flat file database structure; it's _dead easy_ to write scripts to 
manipulate content in just about any way one could want :-) )

Cheers,
Ken



More information about the MediaWiki-l mailing list