Last modified: 2010-05-15 15:59:45 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T14147, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 12147 - Error deleting an uploaded file
Error deleting an uploaded file
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
1.11.x
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: postgres
  Show dependency treegraph
 
Reported: 2007-11-29 11:14 UTC by Jeremy Cook
Modified: 2010-05-15 15:59 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jeremy Cook 2007-11-29 11:14:40 UTC
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
Comment 1 Chris Boyd 2007-11-29 16:43:36 UTC
(In reply to comment #0)
> When I log in as administrator to my mediawiki, I cannot delete a file that was
> previously uploaded:

I can confirm I get this error on MediaWiki 1.11.0, PostgresSQL 8.2.5 and PHP 5.2.5 on FreeBSD 6.2.  It does leave me unable to delete or update already uploaded files.

Here's my similar error output:

Warning: pg_query() [function.pg-query]: Query failed: ERROR: function concat(text, "unknown") does not exist LINE 1: ..._timestamp) SELECT 'deleted',IF(img_sha1='', '', CONCAT(img... ^ HINT: No function matches the given name and argument types. You may need to add explicit type casts. in /usr/local/www/mediawiki/mediawiki-1.11.0/includes/DatabasePostgres.php on line 506
Internal error

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,'.png')),'2','2007-11-29 16:31:39 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 = 'Stinger-Provision-HDSL-9.png' Function: LocalFileDeleteBatch::doDBInserts Error: 1 ERROR: function concat(text, "unknown") does not exist LINE 1: ..._timestamp) SELECT 'deleted',IF(img_sha1='', '', CONCAT(img... ^ HINT: No function matches the given name and argument types. You may need to add explicit type casts.

Backtrace:

#0 /usr/local/www/mediawiki/mediawiki-1.11.0/includes/Database.php(779): DatabasePostgres->reportQueryError('ERROR: functio...', 1, 'INSERT INTO fi...', 'LocalFileDelete...', false)
#1 /usr/local/www/mediawiki/mediawiki-1.11.0/includes/Database.php(1845): Database->query('INSERT INTO fi...', 'LocalFileDelete...')
#2 /usr/local/www/mediawiki/mediawiki-1.11.0/includes/filerepo/LocalFile.php(1216): Database->insertSelect('filearchive', 'image', Array, Array, 'LocalFileDelete...')
#3 /usr/local/www/mediawiki/mediawiki-1.11.0/includes/filerepo/LocalFile.php(1297): LocalFileDeleteBatch->doDBInserts()
#4 /usr/local/www/mediawiki/mediawiki-1.11.0/includes/filerepo/LocalFile.php(873): LocalFileDeleteBatch->execute()
#5 /usr/local/www/mediawiki/mediawiki-1.11.0/includes/FileDeleteForm.php(75): LocalFile->delete('')
#6 /usr/local/www/mediawiki/mediawiki-1.11.0/includes/ImagePage.php(491): FileDeleteForm->execute()
#7 /usr/local/www/mediawiki/mediawiki-1.11.0/includes/Wiki.php(397): ImagePage->delete()
#8 /usr/local/www/mediawiki/mediawiki-1.11.0/includes/Wiki.php(48): MediaWiki->performAction(Object(OutputPage), Object(ImagePage), Object(Title), Object(User), Object(WebRequest))
#9 /usr/local/www/mediawiki/mediawiki-1.11.0/index.php(89): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest))
#10 {main}

Comment 2 Greg Sabino Mullane 2007-12-06 16:48:38 UTC
Please try out r26043, which should fix these problems.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links