Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
I have a development server and a test server, both of which came from an original snapshot of the production server. On the dev server, I have made many changes to schemas, menus, and such. I have set them as tracked, and confirmed that the configurations were written to disk. Then I checked the configurations into git.
On the test server, I pull the latest from git, and run "drush config-sync" in order to load the dev server changes into the test server. This causes the SQLSTATE: Integrity constraint violation included below:
wilton@dev:~/test-drupal$ drush config-sync
WD php: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'PRIMARY': INSERT INTO {node_type} (type, name, [error]
base, has_title, title_label, description, help, custom, modified, locked, disabled, module, orig_type) 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, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11,
:db_insert_placeholder_12); Array
(
[:db_insert_placeholder_0] =>
[:db_insert_placeholder_1] =>
[:db_insert_placeholder_2] => node_content
[:db_insert_placeholder_3] => 0
[:db_insert_placeholder_4] =>
[:db_insert_placeholder_5] =>
[:db_insert_placeholder_6] =>
[:db_insert_placeholder_7] => 1
[:db_insert_placeholder_8] => 1
[:db_insert_placeholder_9] => 0
[:db_insert_placeholder_10] => 0
[:db_insert_placeholder_11] => node
[:db_insert_placeholder_12] =>
)
in node_type_save() (line 528 of /var/www/vhosts/xxxx/drupal-git/modules/node/node.module).
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'PRIMARY': INSERT INTO {node_type} (type, name, base, has_title, title_label, description, help, custom, modified, locked, disabled, module, orig_type) 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, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12); Array
(
[:db_insert_placeholder_0] =>
[:db_insert_placeholder_1] =>
[:db_insert_placeholder_2] => node_content
[:db_insert_placeholder_3] => 0
[:db_insert_placeholder_4] =>
[:db_insert_placeholder_5] =>
[:db_insert_placeholder_6] =>
[:db_insert_placeholder_7] => 1
[:db_insert_placeholder_8] => 1
[:db_insert_placeholder_9] => 0
[:db_insert_placeholder_10] => 0
[:db_insert_placeholder_11] => node
[:db_insert_placeholder_12] =>
)
in node_type_save() (line 528 of /var/www/vhosts/xxxx/drupal-git/modules/node/node.module).
Drush command terminated abnormally due to an unrecoverable error.
Comment | File | Size | Author |
---|---|---|---|
#1 | Screen Shot 2013-08-01 at 2.07.36 PM.png | 24.47 KB | risenhoover |
Comments
Comment #1
risenhoover CreditAttribution: risenhoover commentedNote that this shows up in the configuration on the source computer - it's a blank content-type that might be causing the error. Not sure where it came from.
Comment #2
aytee CreditAttribution: aytee commentedI had the same problem occur. When using drush config-sync I got the same PDOexception errors and had the empty content type appear.
Comment #3
bradallenfisher CreditAttribution: bradallenfisher commentedI also am gettting this error and the blank content type.
I cloned from 7.x-2.x and am having the same issues.
To replicate what happened to me would be hard since my site isn't a fresh install. However, here are the steps I took to get this issue:
on Site A:
drush csta --all
drush cexp --all
on Site B:
drush csyn
I also would occasionally receive a ton of unlink and rmdir warnings/errors for my image styles directories, which would eventually exhaust memory (php mem set to 256M)
Please let me know if I can help testing in any way. Thanks.