Author: jeremy.m.cook
Description:
When I log in as administrator to my mediawiki, I cannot delete a file that was previously uploaded:
Warning: pg_query() [function.pg-query]: Query failed: ERROR: function concat(text, "unknown") does not exist HINT: No function matches the given name and argument types. You may need to add explicit type casts. in /home/local/g4wiki/includes/DatabasePostgres.php on line 516
Intern feil
A database error has occurred Query: INSERT INTO filearchive (fa_storage_group,fa_storage_key,fa_deleted_user,fa_deleted_timestamp,fa_deleted_reason,fa_deleted,fa_name,fa_archive_name,fa_size,fa_width,fa_height,fa_metadata,fa_bits,fa_media_type,fa_major_mime,fa_minor_mime,fa_description,fa_user,fa_user_text,fa_timestamp) SELECT 'deleted',IF(img_sha1='', '', CONCAT(img_sha1,'.jpg')),'1','2007-11-29 11:00:27 GMT','',0,img_name,NULL,img_size,img_width,img_height,img_metadata,img_bits,img_media_type,img_major_mime,img_minor_mime,img_description,img_user,img_user_text,img_timestamp FROM image WHERE img_name = '2007-11-23-202039.jpg' Function: LocalFileDeleteBatch::doDBInserts Error: 1 ERROR: function concat(text, "unknown") does not exist HINT: No function matches the given name and argument types. You may need to add explicit type casts.
Backtrace:
#0 /home/local/g4wiki/includes/Database.php(796): DatabasePostgres->reportQueryError('ERROR: functio...', 1, 'INSERT INTO fi...', 'LocalFileDelete...', false)
#1 /home/local/g4wiki/includes/Database.php(1862): Database->query('INSERT INTO fi...', 'LocalFileDelete...')
#2 /home/local/g4wiki/includes/filerepo/LocalFile.php(1216): Database->insertSelect('filearchive', 'image', Array, Array, 'LocalFileDelete...')
#3 /home/local/g4wiki/includes/filerepo/LocalFile.php(1297): LocalFileDeleteBatch->doDBInserts()
#4 /home/local/g4wiki/includes/filerepo/LocalFile.php(873): LocalFileDeleteBatch->execute()
#5 /home/local/g4wiki/includes/FileDeleteForm.php(75): LocalFile->delete('')
#6 /home/local/g4wiki/includes/ImagePage.php(493): FileDeleteForm->execute()
#7 /home/local/g4wiki/includes/Wiki.php(397): ImagePage->delete()
#8 /home/local/g4wiki/includes/Wiki.php(48): MediaWiki->performAction(Object(OutputPage), Object(ImagePage), Object(Title), Object(User), Object(WebRequest))
#9 /home/local/g4wiki/index.php(89): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest))
#10 {main}
I am using the patched DatabasePostgres.php as found here (but it doesnt seem to make any difference if I go back to the original, the same error occurs with a different line number):
http://svn.wikimedia.org/viewvc/mediawiki?view=rev&revision=26040
I get another, possibly similar or the same, error when uploading an update to an existing file.
I have postgres 8.1 on UBUNTU
Version: 1.11.x
Severity: major