Getting the following error message when updating from 7.x-1.0 to RC2:

Update #7205
Failed: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '23' for key 'PRIMARY': INSERT INTO {weight_weights} (entity_id, entity_type, weight) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => 23 [:db_insert_placeholder_1] => node [:db_insert_placeholder_2] => 0 ) in weight_update_7205() (Line 235 weight.install).

Comments

davisben’s picture

Is this site multilingual by chance?

sense-design’s picture

Yes, 2 languages installed, German and English but English is not used, default language is German.

pwesthagen’s picture

I also have the same error when running update.php after upgrading to 7.x-2.0-rc2 but unlike the original poster my site is not multilingual.

The following updates returned messages

weight module

Update #7205
Failed: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '574' for key 'PRIMARY': INSERT INTO {weight_weights} (entity_id, entity_type, weight) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => 574 [:db_insert_placeholder_1] => node [:db_insert_placeholder_2] => 0 ) in weight_update_7205() (line 235 of <drupal dir>/sites/all/modules/weight/weight.install).

davisben’s picture

Status: Active » Fixed

I wasn't able to consistently reproduce this, but it should be fixed now.

sense-design’s picture

What did you change?

davisben’s picture

I added a check to see if the table already exists. When upgrading from 7.x-1.x, the schema is installed in 7200 and the weights are migrated in 7202. 7205 was trying to do it again, causing the error.

pwesthagen’s picture

Version: 7.x-2.0-rc2 » 7.x-2.x-dev

7.x-2.x-dev fixed it form me. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Removed unneeded path values from error message