Last modified: 2011-04-04 21:28:26 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 7841 - duplicate key violates unique constraint
duplicate key violates unique constraint
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.8.x
Other Linux
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: postgres
  Show dependency treegraph
 
Reported: 2006-11-08 12:29 UTC by Swen Wacker
Modified: 2011-04-04 21:28 UTC (History)
0 users

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


Attachments

Description Swen Wacker 2006-11-08 12:29:31 UTC
MediaWiki: 1.8.2 
PHP: 5.1.4-pl0-gentoo (apache) 
PostgreSQL: PostgreSQL 8.1.4 on x86_64-pc-linux-gnu, compiled by GCC x86_64-pc-linux-gnu-gcc (GCC) 3.4.5 
(Gentoo 3.4.5, ssp-3.4.5-1.0, pie-8.7.9) 
+(Some Extensions)

After saving Changes of an article, the following message appears "sometimes" (can´t reproduce the 
specific circumstances). Nevertheless the changes are saved.

Notice: Undefined offset: -2 in (...)/mediawiki-test/mediawiki-1.8.2/languages/Language.php on line 368

Warning: pg_query() [function.pg-query]: Query failed: ERROR: duplicate key violates unique 
constraint "wl_user_namespace_title" in (...)/mediawiki-test/mediawiki-
1.8.2/includes/DatabasePostgres.php on line 381

A database error has occurred Query: INSERT INTO watchlist 
(wl_user,wl_namespace,wl_title,wl_notificationtimestamp) VALUES ('2','2','Stefanm',NULL) Function: 
WatchedItem::addWatch Error: 1 ERROR: duplicate key violates unique constraint "wl_user_namespace_title" 

Backtrace:

#0 (...)/mediawiki-test/mediawiki-1.8.2/includes/Database.php(651): DatabasePostgres->reportQueryError
('ERROR: duplica...', 1, 'INSERT INTO wa...', 'WatchedItem::ad...', false)
#1 (...)/mediawiki-test/mediawiki-1.8.2/includes/Database.php(1251): Database->query('INSERT INTO 
wa...', 'WatchedItem::ad...')
#2 (...)/mediawiki-test/mediawiki-1.8.2/includes/DatabasePostgres.php(498): Database->insert
('watchlist', Array, 'WatchedItem::ad...', Array)
#3 (...)/mediawiki-test/mediawiki-1.8.2/includes/WatchedItem.php(78): DatabasePostgres->insert
('watchlist', Array, 'WatchedItem::ad...', 'IGNORE')
#4 (...)/mediawiki-1.8.2/includes/User.php(1398): WatchedItem->addWatch()
#5 (...)/mediawiki-test/mediawiki-1.8.2/includes/User.php(1050): User->addWatch(Object(Title))
#6 (...)/mediawiki-test/mediawiki-1.8.2/includes/Article.php(2153): User->setNewtalk(true)
#7 (...)/mediawiki-test/mediawiki-1.8.2/includes/Article.php(1302): Article->editUpdates('== Namensr??
ume...', '', false, '20061108131525', '2458', true)
#8 (...)/mediawiki-test/mediawiki-1.8.2/includes/Article.php(1136): Article->doEdit('== Namensr??
ume...', '', 34)
#9 (...)/mediawiki-test/mediawiki-1.8.2/includes/EditPage.php(789): Article->updateArticle('== Namensr??
ume...', '', false, false, '', '')
#10 (...)/mediawiki-test/mediawiki-1.8.2/includes/EditPage.php(364): EditPage->attemptSave()
#11 (...)/mediawiki-test/mediawiki-1.8.2/includes/EditPage.php(217): EditPage->edit()
#12 (...)/mediawiki-test/mediawiki-1.8.2/includes/Wiki.php(391): EditPage->submit()
#13 (...)/mediawiki-test/mediawiki-1.8.2/includes/Wiki.php(50): MediaWiki->performAction(Object
(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
#14 (...)/mediawiki-test/mediawiki-1.8.2/index.php(47): MediaWiki->initialize(Object(Title), Object
(OutputPage), Object(User), Object(WebRequest))
#15 {main}
Comment 1 Greg Sabino Mullane 2006-12-06 21:56:10 UTC
Thanks for the report, this should be fixed as of r18016.

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


Navigation
Links