0

I'm trying to trace this error which is shown when I save a new basic page node.

It seems to me that I am trying to save a duplicated title value in field_data_title_field, but it doesn't make any sense to me. I found this question PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1532856' for key 'PRIMARY': INSERT INTO {watchdog} but it was related to dblog table (Watchdog module). Mine is related to: modules/field/modules/field_sql_storage/field_sql_storage.module

Drupal core is updated to last version.

How can I trace and fix this?

ERROR:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'node-4294967295-0-0-und' for key 'PRIMARY': INSERT INTO {field_data_title_field} (entity_type, entity_id, revision_id, bundle, delta, language, title_field_value, title_field_format) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7); Array ( [:db_insert_placeholder_0] => node [:db_insert_placeholder_1] => 4294967295 [:db_insert_placeholder_2] => 3187 [:db_insert_placeholder_3] => page [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und [:db_insert_placeholder_6] => My node title [:db_insert_placeholder_7] => ) enfield_sql_storage_field_storage_write() (line 514 of /home/examplesite/www/modules/field/modules/field_sql_storage/field_sql_storage.module )

0

The composite primary key for field tables is entity_type,entity_id,deleted,delta,language. The error itself lists the key:

'node-4294967295-0-0-und'

You can confirm that there is a pre-existing field in the table by querying your database with a search on those values.

Also of note, your node id is at 4294967295. This is the upper limit of 32-bit unsigned integers; anything higher than that is going to start causing problems with your SQL storage.

  • Then I understand that the problem is the field reached it limit. And the problem is not a "duplicated" value. Am I right? – chefnelone Oct 16 '15 at 7:20
  • Without access to the DB I can't say for certain, but it does look like the duplicate entry is a side effect of your node id sequence being maxed out. – Shawn Conn Oct 16 '15 at 7:35
-1

Since you've reached your limit for your data value in this column, the value is acting as a MAX and using the maximum value that can be stored in the column. In this case, it's already in use.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.