Hello
I want to update an image stored in mediawiki. In order to do that, I upload the new version, using the same file name the image was previously known.
mediawiki fires an internal error, with all the details below.
This is mediawiki-1.11.0, php-5.2.5, postgresql-8.2.6. Any hint?
--- cut here --- Erreur interne
A database error has occurred Query: INSERT INTO oldimage (oi_name,oi_archive_name,oi_size,oi_width,oi_height,oi_bits,oi_timestamp,oi_description,oi_user,oi_user_text,oi_metadata,oi_media_type,oi_major_mime,oi_minor_mime,oi_sha1) SELECT img_name,'20080123094112!Test.jpg',img_size,img_width,img_height,img_bits,img_timestamp,img_description,img_user,img_user_text,img_metadata,img_media_type,img_major_mime,img_minor_mime,img_sha1 FROM image WHERE img_name = 'Test.jpg' Function: LocalFile::recordUpload2 Error: 1 ERROR: column "oi_metadata" is of type bytea but expression is of type text LINE 1: ...,oi_timestamp,oi_description,oi_user,oi_user_text,oi_metadat... ^ HINT: You will need to rewrite or cast the expression.
Backtrace:
#0 /usr/local/src/mediawiki-1.11.0/includes/Database.php(779): DatabasePostgres->reportQueryError('ERROR: column ...', 1, 'INSERT INTO ol...', 'LocalFile::reco...', false) #1 /usr/local/src/mediawiki-1.11.0/includes/Database.php(1845): Database->query('INSERT INTO ol...', 'LocalFile::reco...') #2 /usr/local/src/mediawiki-1.11.0/includes/filerepo/LocalFile.php(746): Database->insertSelect('oldimage', 'image', Array, Array, 'LocalFile::reco...') #3 /usr/local/src/mediawiki-1.11.0/includes/filerepo/LocalFile.php(642): LocalFile->recordUpload2('20080123094112!...', 'Photo de Bertra...', 'Photo de Bertra...', Array, false) #4 /usr/local/src/mediawiki-1.11.0/includes/SpecialUpload.php(436): LocalFile->upload('/tmp/php25707k', 'Photo de Bertra...', 'Photo de Bertra...', 1, Array) #5 /usr/local/src/mediawiki-1.11.0/includes/SpecialUpload.php(248): UploadForm->processUpload() #6 /usr/local/src/mediawiki-1.11.0/includes/SpecialUpload.php(14): UploadForm->execute() #7 /usr/local/src/mediawiki-1.11.0/includes/SpecialPage.php(653): wfSpecialUpload(NULL, Object(SpecialPage)) #8 /usr/local/src/mediawiki-1.11.0/includes/SpecialPage.php(459): SpecialPage->execute(NULL) #9 /usr/local/src/mediawiki-1.11.0/includes/Wiki.php(201): SpecialPage::executePath(Object(Title)) #10 /usr/local/src/mediawiki-1.11.0/includes/Wiki.php(45): MediaWiki->initializeSpecialCases(Object(Title), Object(OutputPage), Object(WebRequest)) #11 /usr/local/src/mediawiki-1.11.0/index.php(89): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest)) #12 {main} --- cut here ---