Hi all,
I am struggling with an issue for days now and I hope you can help me.
I have a Drupal 7 install with the Profile2 module enabled. When an user saves their profile the following error occurs:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'name': UPDATE {users} SET name=:db_update_placeholder_0, pass=:db_update_placeholder_1, mail=:db_update_placeholder_2, theme=:db_update_placeholder_3, signature=:db_update_placeholder_4, signature_format=:db_update_placeholder_5, created=:db_update_placeholder_6, access=:db_update_placeholder_7, login=:db_update_placeholder_8, status=:db_update_placeholder_9, timezone=:db_update_placeholder_10, language=:db_update_placeholder_11, picture=:db_update_placeholder_12, init=:db_update_placeholder_13, data=:db_update_placeholder_14 WHERE (uid = :db_condition_placeholder_0) ; Array ( [:db_update_placeholder_0] => [:db_update_placeholder_1] => $S$Dl6Z6xz.pNLRFnIwPiJM6xNkmOmuYxpZgdEyxuh3CzM8TJ2vfe0L [:db_update_placeholder_2] => jessica@occhio.nl [:db_update_placeholder_3] => [:db_update_placeholder_4] => [:db_update_placeholder_5] => filtered_html [:db_update_placeholder_6] => 1424964096 [:db_update_placeholder_7] => 1430301684 [:db_update_placeholder_8] => 1430300487 [:db_update_placeholder_9] => 1 [:db_update_placeholder_10] => Europe/Amsterdam [:db_update_placeholder_11] => [:db_update_placeholder_12] => 164 [:db_update_placeholder_13] => jessica@test.nl [:db_update_placeholder_14] => a:5:{s:16:"ckeditor_default";s:1:"t";s:20:"ckeditor_show_toggle";s:1:"t";s:14:"ckeditor_width";s:4:"100%";s:13:"ckeditor_lang";s:2:"en";s:18:"ckeditor_auto_lang";s:1:"t";} [:db_condition_placeholder_0] => 502 ) in drupal_write_record() (regel 7291 van /htdocs/includes/common.inc).
When I google this, I see a lot of people talking about a core fix, but the fix is already in the core. So that's not it. Next to that they say there is a conflict with Rules, but if I deinstall rules the error keeps on coming. Also I upgraded to profile2 dev version, but that didn't solve it either. I deinstalled all the extra modules I've used and still the error occurs. I am lost.
Can someone please tell me how to solve this?
Thanks!
Jessica
Comments
Comment #1
biswajeetparida commentedi am also facing same problem . Did you find any solution?
Comment #2
lingochad commentedThis error is related to the PHP version. If I revert back to PHP 5.3 I can save a user profile. Up to php 5.6 and no dice. I am about to dig into the code to see if I can find what is incompatible with the newer PHP. If anyone has an idea of where to look, I (we) will be most grateful.
Comment #3
Sylense commentedI had a similar issue but turned out is was the Automatic User Names module. If you are using that module there is a patch: https://www.drupal.org/node/2384999