Topic on Project:Support desk

[RESOLVED] Images Don't Work on 1.19.2

15
Pocket lint (talkcontribs)

Alright, so I just upgraded my wiki from 1.17.0 to 1.19.2, and for whatever reason my images don't work. I suspect it's got something to do with ImageMagick, as instead of the image, I get this error:

Error creating thumbnail: Magick: unable to open image `C:\MediaWiki\xampp\htdocs\testwiki/images/7/7e/Square_brackets_blue.png': No such file or directory @ error/blob.c/OpenBlob/2588. Magick: unable to open file `C:\MediaWiki\xampp\htdocs\testwiki/images/7/7e/Square_brackets_blue.png' @ error/png.c/ReadPNGImage/3649. Magick: missing an image filename `C:\WINDOWS\TEMP/transform_70c1a5-1.png' @ error/convert.c/ConvertImageCommand/3015.

MediaWiki 1.19.2
PHP 5.3.5
MySQL 5.5.8
Windows XP

Pocket lint (talkcontribs)

I managed to fix it, apparently I had accidentally copied my old image directory such that it was placed inside my new image directory, instead of replacing the new directory ($IP/image/image/content), which was confusing ImageMagick. So now I've fixed my image problem, but now I'm noticing my uploads aren't working. I'm getting this error every time I try to upload:

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

   (SQL query hidden)

from within function "RecentChange::save". Database returned error "1054: Unknown column 'rc_moved_to_ns' in 'field list' (localhost)".

And it's not just uploading, I get the same error whenever I try to create or edit pages.

Ciencia Al Poder (talkcontribs)
Pocket lint (talkcontribs)

Yeah, and I even rebooted my computer just in case

Ciencia Al Poder (talkcontribs)

According to Manual:Recentchanges_table#rc_moved_to_ns, that field shouldn't be used anymore since MediaWiki 1.8, although it says the field is still there, the database script doesn't contain it.

Try disabling all extensions and see if it's still a problem. Maybe you have an outdated extension that expects the field to be there.

Pocket lint (talkcontribs)

Okay, I disabled all my extensions, even returned my localsettings file to the auto-generated settings, but it didn't help.

It's weird, I tried looking in my mysql database for rc_moved_to_ns, but I couldn't find it, so I don't even know why it's saying that column is causing an error, it apparently doesn't even exist. But, it's also entirely possible that I somehow searched for it wrong, since I usually don't mess with the database too much so I'm still somewhat inexperienced with it.

Someone else said it may be that my database is just corrupted and that I may have to set it back up from scratch (luckily I did make a backup). Thoughts?

Another thing I noticed was that there was an image in my that I had tried uploading while I was having the previous image problem, but that had failed to upload... well, apparently, it somehow managed to generate an image page, but without the image. I've tried deleting it, but I can't, I get the following error:

A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script Query: INSERT INTO `recentchanges` (rc_timestamp,rc_cur_time,rc_namespace,rc_title,rc_type,rc_minor,rc_cur_id,rc_user,rc_user_text,rc_comment,rc_this_oldid,rc_last_oldid,rc_bot,rc_moved_to_ns,rc_moved_to_title,rc_ip,rc_patrolled,rc_new,rc_old_len,rc_new_len,rc_deleted,rc_logid,rc_log_type,rc_log_action,rc_params,rc_id) VALUES ('20121106052549','20121106052549','6','Regular_Show-_Wrinkles_and_Folds.jpg','3','0','0','1','Admin','content was: \"=={{int:filedesc}}== {{Information |description={{en|1=regular show hat}} |date=2012-08-06 |source={{own}} |author=[[User:Admin|Admin]] |permission= |other_versions= ...\" (and the only contributor was \"[[Special:Contributions/Admin|Admin]]\")','0','0','0','0','','127.0.0.1','1','0',NULL,NULL,'0','4274','delete','delete','a:0:{}',NULL) Function: RecentChange::save Error: 1054 Unknown column 'rc_moved_to_ns' in 'field list' (localhost)

(Heck, I just ran update.php again, just to be sure, and I still get that message when I try to delete it. Maybe the file is corrupted? And it's corrupting the rest of the database?)

Ciencia Al Poder (talkcontribs)

This is really weird. there's no mention to rc_moved_to_ns from that class.

Some uprade problems come because people unpack the tarball over the old installation, and some files aren't overwritten properly or old files are still around.

try to unpack in a clean folder, and then copy LocalSettings and run the wiki from there and see if that solves the problem. If that also fails, search in all your files for the string "rc_moved_to_ns" to see what's the offending file that is wrong.

164.2.255.244 (talkcontribs)

on the wiki database :

  • alter table recentchanges add column rc_moved_to_title varbinary(255) NOT NULL DEFAULT ;
  • alter table recentchanges add column rc_moved_to_ns tinyint(3) unsigned NOT NULL DEFAULT '0' ;
Pocket lint (talkcontribs)

Alright, I ended up just deleting the database and creating a new one, and importing the tables from my backup. Everything seems to be running smoothly now, so I'm supposing that the database had been corrupted after all.

Thanks to both of you for your help!! Hopefully my next update goes a bit more smoothly :p

Pocket lint (talkcontribs)

.... Or so I thought. I can create and edit pages, but now my image uploads aren't working again (and it's not a problem with the filesystem like before, I made sure to double-check that). And no matter how many times I start over with a new database and new filesystem, everything works fine until I try to upload something. I'm suspecting that my database was corrupted even at the time I backed it up... so I'm gonna try making a new wiki and importing the xml dump into it.

However, I can't seem to figure out the proper syntax to use on the Windows command line to import the xml file. If you could help me with that, I'd greatly appreciate it.

(so far I've been trying things like C:\MediaWiki\xampp\php\php.exe C:\MediaWiki\xampp\htdocs\testwiki3\maintenance\importDump.php php importDump.php dump.xml, but that doesn't seem to be quite right...)

Pocket lint (talkcontribs)
Ciencia Al Poder (talkcontribs)

What happens when you upload something?

Pocket lint (talkcontribs)

Everything works fine until I hit the upload button, and then the page never stops loading.

Ciencia Al Poder (talkcontribs)
Pocket lint (talkcontribs)

Oddly enough, when I logged in today, I was able to upload images and everything is working smoothly.... I'm not really sure how or why, maybe I just needed to restart the database or my computer, but the problem seems to be solved. o.O

Thanks a lot for your help!!

Reply to "[RESOLVED] Images Don't Work on 1.19.2"