Last modified: 2012-08-04 20:49:06 UTC
Created attachment 4514 [details] Patch for includes/SpecialUndelete.patch & includes/filerepo/LocalFile.php. System: -------------------------------------------------------------- *MediaWiki 1.11.0 + bug 12365 fixed. *PostgreSQL 8.2.5 *FreeBSD/pc98 4.7R Appears: ------------------------------------------------------------- *Can't view deleted image (File history) on [[Special:Undelete/Image:filename.png]]. *Can't undelete deleted images. Error message: ------------------------------------------------------- Bad request Invalid or badly-formed filename. Cause: --------------------------------------------------------------- In PostgreSQL, getting value of filearchive.fa_storage_key has space-filled by fetchObject(). maintenance/postgres/tables.sql (PostgreSQL) CREATE TABLE filearchive ( ... fa_storage_key CHAR(64), Solution: ------------------------------------------------------------ Patch for includes/SpecialUndelete.patch and includes/filerepo/LocalFile.php, and try it. % cd /path/to/mediawiki-1.11.0 % patch < /path/to/patch Note: ---------------------------------------------------------------- I haven't test this patch with MySQL. Please test it! # If you want to read this document in Japanese, please see: 日本語の解説をこちらに書いておきます→http://www.cory.to/kn/kn080106
Created attachment 4515 [details] Patch for maintenance/postgres/tables.sql, for "other solution". Other solution: ------------------------------------------------------ Change datatype of filearchive.fa_storage_key from CHAR() to VARCHAR(). If you wouldn't change source code, change maintenance/postgres/tables.sql and rebuild filearchive table (like bug 12365 :-) ).
Please compare this to bug #12147 a fix for the field to which you refer may be in r26043