Last modified: 2011-04-04 21:32:39 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 8346 - Replacing media files fails due to unique key constraint (PostgreSQL)
Replacing media files fails due to unique key constraint (PostgreSQL)
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
Other other
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2006-12-21 09:48 UTC by Andreas Walter
Modified: 2011-04-04 21:32 UTC (History)
0 users

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


Description Andreas Walter 2006-12-21 09:48:59 UTC
System:    AIX 5.3, Technical Level 5
DB:        Postgesql 8.1.5
Webserver: Apache 2.2.3 with PHP 5.1.6
Mediawiki: Version 1.8.2, German language

The Upload of images/files works.

Updating the image/file with the Upload new version function
of mediawiki doesn't work at all.

Output with $wgShowExceptionDetails = true; follows.

Looks for me like a database problem:
ERROR: duplicate key violates unique constraint "image_pkey"

Interner Fehler (Translation from German to English: Internal Error)

A database error has occurred Query: INSERT INTO image
08:53:28 GMT','','2','U48awa','a:0:{}') Function: Image::recordUpload Error: 1
ERROR: duplicate key violates unique constraint "image_pkey"


#0 /data/httpd/ux48prmue76/mediawiki-1.8.2/includes/Database.php(651):
DatabasePostgres->reportQueryError('ERROR: duplica...', 1, 'INSERT INTO im...',
'Image::recordUp...', false)
#1 /data/httpd/ux48prmue76/mediawiki-1.8.2/includes/Database.php(1251):
Database->query('INSERT INTO im...', 'Image::recordUp...')
#2 /data/httpd/ux48prmue76/mediawiki-1.8.2/includes/DatabasePostgres.php(498):
Database->insert('image', Array, 'Image::recordUp...', Array)
#3 /data/httpd/ux48prmue76/mediawiki-1.8.2/includes/Image.php(1605):
DatabasePostgres->insert('image', Array, 'Image::recordUp...', 'IGNORE')
#4 /data/httpd/ux48prmue76/mediawiki-1.8.2/includes/SpecialUpload.php(434):
Image->recordUpload('', '', '', '', '', false)
#5 /data/httpd/ux48prmue76/mediawiki-1.8.2/includes/SpecialUpload.php(234):
#6 /data/httpd/ux48prmue76/mediawiki-1.8.2/includes/SpecialUpload.php(15):
#7 /data/httpd/ux48prmue76/mediawiki-1.8.2/includes/SpecialPage.php(522):
wfSpecialUpload(NULL, Object(SpecialPage))
#8 /data/httpd/ux48prmue76/mediawiki-1.8.2/includes/SpecialPage.php(391):
#9 /data/httpd/ux48prmue76/mediawiki-1.8.2/includes/Wiki.php(156):
#10 /data/httpd/ux48prmue76/mediawiki-1.8.2/includes/Wiki.php(47):
MediaWiki->initializeSpecialCases(Object(Title), Object(OutputPage),
#11 /data/httpd/ux48prmue76/mediawiki-1.8.2/index.php(47):
MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User),
#12 {main}
Comment 1 Greg Sabino Mullane 2006-12-25 18:06:31 UTC
Fixed due to a similar bug: see r18016

Thanks for the detailed bug report though, much appreciated!

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