Mailing List Archive

Help with images lost in database upgrade
http://www.bbref.com/bullpen/

Fairly large wiki, with 12,000 images and 46,000 pages. This morning we
upgraded our database server to a newer machine. All of the content, etc
works fine and nothing was lost, but now images no longer appear and are
replaced with their names. Clicking on the name says image not found.

The images are still there on the server in the images dir. For example.

http://www.baseball-reference.com/bullpen/Image:100px-Floridamarlins.gif
can be found here
http://www.baseball-reference.com/bpv/images/5/51/100px-Floridamarlins.gif

I've tried rebuildImages.php from the command line and that doesn't do the
trick. Any thoughts? Re-import them?

I'm guessing that updating the db somehow messed up mediawiki knowing the
exact path to the image, but I'm not sure about that.

thanks,
sean
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Re: Help with images lost in database upgrade [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sean Forman wrote:
> http://www.bbref.com/bullpen/
>
> Fairly large wiki, with 12,000 images and 46,000 pages. This morning we
> upgraded our database server to a newer machine. All of the content, etc
> works fine and nothing was lost, but now images no longer appear and are
> replaced with their names. Clicking on the name says image not found.
>
> The images are still there on the server in the images dir. For example.
>
> http://www.baseball-reference.com/bullpen/Image:100px-Floridamarlins.gif
> can be found here
> http://www.baseball-reference.com/bpv/images/5/51/100px-Floridamarlins.gif
>
> I've tried rebuildImages.php from the command line and that doesn't do the
> trick. Any thoughts? Re-import them?
>
> I'm guessing that updating the db somehow messed up mediawiki knowing the
> exact path to the image, but I'm not sure about that.

The paths seem just fine, see the 'file' links at
http://www.baseball-reference.com/bullpen/Special:Imagelist

I'm not really sure what's going on... You seem to have database entries
(they show up on Special:imagelist and Special:newimages) and files (the
links from imagelist are fine), but they're not matching up in usage.

It's possible something's gone weird in your 'image' table such that the
data's there but doesn't get matched properly when doing queries; maybe
a broken collection or null-padding or something funky. Do some checks
on the database and see what the data and the structure look like...

- -- brion
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkibVd4ACgkQwRnhpk1wk47BOgCg0X1+9ptAVok00PEdZtfk7k1I
GU0Anib/+cg17djfJm3C1lABkijiM4U4
=Nnw+
-----END PGP SIGNATURE-----

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Re: Help with images lost in database upgrade [ In reply to ]
>
>
> The paths seem just fine, see the 'file' links at
> http://www.baseball-reference.com/bullpen/Special:Imagelist
>
> I'm not really sure what's going on... You seem to have database entries
> (they show up on Special:imagelist and Special:newimages) and files (the
> links from imagelist are fine), but they're not matching up in usage.
>
> It's possible something's gone weird in your 'image' table such that the
> data's there but doesn't get matched properly when doing queries; maybe
> a broken collection or null-padding or something funky. Do some checks
> on the database and see what the data and the structure look like...
>
>


Any ideas what to check for? Does the file location depend at all on the
db? Is it building a hash from the db somehow?

sean


--
Sean Forman
President, Sports Reference LLC
http://www.sports-reference.com/
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Re: Help with images lost in database upgrade [ In reply to ]
Sean Forman wrote:
>
> Any ideas what to check for? Does the file location depend at all on the
> db? Is it building a hash from the db somehow?
>
> sean

It builds a hash from the image name (the 5/51 bit).
OTOH, you seem to have lost the entries at the image table (No file by
this name exists), OTH, they're listed at Special:Imagelist...

I'd try listing the first entries of the image table (put a limit!), and
then checking why they aren't shown, the queries mediawiki is running...


_______________________________________________
MediaWiki-l mailing list
MediaWiki-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Re: Help with images lost in database upgrade [ In reply to ]
Got this fixed. Tried this query.

mysql> select * from image where img_name like "%JohnMcGraw.jpg";
1 row in set (0.01 sec)

mysql> select * from image where img_name like "JohnMcGraw.jpg%";
1 row in set (0.00 sec)

mysql> select * from image where img_name like "JohnMcGraw.jpg";
0 row in set.


So there was some funkiness going on with the img_name column. I did the
following and it was fixed.

First I dumped the image table.

mysql> alter table image add column img_name2 varchar(255);
mysql> update image set img_name2=img_name;
mysql> select * from image where img_name2 like "JohnMcGraw.jpg";
1 row in set (0.00 sec
mysql> update image set img_name=img_name2;
mysql> alter table image drop column img_name2;


And that took care of it.
Thank you for the help.



--
Sean Forman
President, Sports Reference LLC
http://www.sports-reference.com/
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Re: Help with images lost in database upgrade [ In reply to ]
Sean Forman wrote:
> Got this fixed. Tried this query.
>
> mysql> select * from image where img_name like "%JohnMcGraw.jpg";
> 1 row in set (0.01 sec)
>
> mysql> select * from image where img_name like "JohnMcGraw.jpg%";
> 1 row in set (0.00 sec)
>
> mysql> select * from image where img_name like "JohnMcGraw.jpg";
> 0 row in set.

That seems to be a broken index. The third query uses the index, the
first one doesn't use it. I don't remember if the second query qualifies
for the index, but I'm pretty sure it does. It seems that you got some
junk after the img_name field in the index, and queries fail unless you
avoid the index (first query) or ignore the trailing (second query).

The SQL query 'REPAIR TABLE img_name;', or the command 'myisamchk
--recover' would fix this problem for you, or...

> mysql> alter table image add column img_name2 varchar(255);
> mysql> update image set img_name2=img_name;
> mysql> select * from image where img_name2 like "JohnMcGraw.jpg";
> 1 row in set (0.00 sec
> mysql> update image set img_name=img_name2;
> mysql> alter table image drop column img_name2;

You pretty much rebuilt the index manually, in that forth statement. I
think that even an "update image set img_name=img_name;" would do it in
this case.

--
Juliano F. Ravasi ·· http://juliano.info/
5105 46CC B2B7 F0CD 5F47 E740 72CA 54F4 DF37 9E96

"A candle loses nothing by lighting another candle." -- Erin Majors

* NOTE: Don't try to reach me through this address, use "contact@" instead.

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Re: Help with images lost in database upgrade [ In reply to ]
Hi,

I have had the same problem a few weeks ago, I managed to solve it
launching a script in the maintenance directory (it is a bit long
running), I do not remember which one, but I think it was rebuildImage

Please advice if it helped.
Best Regards
Steph



Le Thu, 07 Aug 2008 21:54:56 +0200, Sean Forman
<sean-forman@baseball-reference.com> a écrit:

> http://www.bbref.com/bullpen/
>
> Fairly large wiki, with 12,000 images and 46,000 pages. This morning we
> upgraded our database server to a newer machine. All of the content, etc
> works fine and nothing was lost, but now images no longer appear and are
> replaced with their names. Clicking on the name says image not found.
>
> The images are still there on the server in the images dir. For example.
>
> http://www.baseball-reference.com/bullpen/Image:100px-Floridamarlins.gif
> can be found here
> http://www.baseball-reference.com/bpv/images/5/51/100px-Floridamarlins.gif
>
> I've tried rebuildImages.php from the command line and that doesn't do
> the
> trick. Any thoughts? Re-import them?
>
> I'm guessing that updating the db somehow messed up mediawiki knowing the
> exact path to the image, but I'm not sure about that.
>
> thanks,
> sean
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
>



_______________________________________________
MediaWiki-l mailing list
MediaWiki-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Re: Help with images lost in database upgrade [ In reply to ]
> Le Thu, 07 Aug 2008 21:54:56 +0200, Sean Forman
> <sean-forman@baseball-reference.com> a écrit:
>> Fairly large wiki, with 12,000 images and 46,000 pages. This morning we
>> upgraded our database server to a newer machine. All of the content, etc
>> works fine and nothing was lost, but now images no longer appear and are
>> replaced with their names. Clicking on the name says image not found.

Check you Apache logs; I got this once and had stuffed the perms. on the
images dir. such that Apache could no longer see it.

--
[neil@fnx ~]# rm -f .signature
[neil@fnx ~]# ls -l .signature
ls: .signature: No such file or directory
[neil@fnx ~]# exit


_______________________________________________
MediaWiki-l mailing list
MediaWiki-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Re: Help with images lost in database upgrade [ In reply to ]
Take a look at my solution. I had the same
problem. Basically I made a dump of the database,
dropped the database, created a new one, imported
the dump in SSH and all was fine again.


At 07:45 PM 9/4/2008, you wrote:
> > Le Thu, 07 Aug 2008 21:54:56 +0200, Sean
> Forman > <sean-forman@baseball-reference.com>
> a écrit: >> Fairly large wiki, with 12,000
> images and 46,000 pages. This morning we >>
> upgraded our database server to a newer
> machine. All of the content, etc >> works fine
> and nothing was lost, but now images no longer
> appear and are >> replaced with their
> names. Clicking on the name says image not
> found. Check you Apache logs; I got this
> once and had stuffed the perms. on the images
> dir. such that Apache could no longer see it.
> -- [neil@fnx ~]# rm -f .signature [neil@fnx ~]#
> ls -l .signature ls: .signature: No such file
> or directory [neil@fnx ~]# exit
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


Henny (Lee Hae Kang)
-----------------------------
http://www.henny-savenije.pe.kr Portal to all my sites
http://www.hendrick-hamel.henny-savenije.pe.kr
(in English) Feel free to discover Korea with Hendrick Hamel (1653-1666)
http://www.hendrick-hamel.henny-savenije.pe.kr/indexk2.htm In Korean
http://www.hendrick-hamel.henny-savenije.pe.kr/Dutch In Dutch
http://www.vos.henny-savenije.pe.kr Frits Vos
Article about Witsen and Eibokken and his first Korean-Dutch dictionary
http://www.cartography.henny-savenije.pe.kr (in
English) Korea through Western Cartographic eyes
http://www.hwasong.henny-savenije.pe.kr Hwasong the fortress in Suwon
http://www.oldKorea.henny-savenije.pe.kr Old Korea in pictures
http://www.british.henny-savenije.pe.kr A British encounter in Pusan (1797)
http://www.genealogy.henny-savenije.pe.kr/ Genealogy
http://www.henny-savenije.pe.kr/phorum Bulletin board for Korean studies




_______________________________________________
MediaWiki-l mailing list
MediaWiki-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l