General error when creating an account I'm testing the creation of user accounts on the new website and I get a general database error after attempting to create an account. The error log shows:


  Sep 14 09:06:01 test drupal_www_example_com:
  https://test.example.com|1505379961|php|97.120.1.69|https://test.example.com/user/register|https://test.example.com/user/register|0||PDOException:
  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
  &#039;user-203409-0-0-und&#039; for key &#039;PRIMARY&#039;: INSERT
  INTO {field_data_field_name_first} (entity_type, entity_id,
  revision_id, bundle, delta, language, field_name_first_value,
  field_name_first_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#012(#012
  [:db_insert_placeholder_0] =&gt; user#012
  [:db_insert_placeholder_1] =&gt; 203409#012
  [:db_insert_placeholder_2] =&gt; 203409#012
  [:db_insert_placeholder_3] =&gt; user#012
  [:db_insert_placeholder_4] =&gt; 0#012    [:db_insert_placeholder_5]
  =&gt; und#012    [:db_insert_placeholder_6] =&gt; betachristia556#012    [:db_insert_placeholder_7] =&gt; #012)#012 in
  field_sql_storage_field_storage_write() (line 514 of
  /var/www/html/example/docroot/modules/field/modules/field_sql_storage/field_sql_storage.module).


I looked in the user table and there is no user for the ID 203409.
The field_data_field_name_first field had some data stored in it for that user ID, apparently because it was migrated in at a later time than the user table or because I didn't drop the database before I imported new data. As a result, the system couldn't write to the database user table and field_data_field_name_first table. The solution was to do a fresh import of the user table and the first and last name custom fields.

This was on a test site.