I had the same issue on an existing site and have managed to re-create on a vanilla install of Drupal.

Install dev 7.2 registration and any necessary needed modules.

Create a registration type with default fields

Add a registration entity field to the article content type and reference the new reg type.

Set necessary settings to expose the registration form on the article content type.

Set permissions for the anon user to create registrations.

Load up the article page (not logged in) and submit a registration.

Error
The website encountered an unexpected error. Please try again later.
Error messagePDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'name': INSERT INTO {users} (uid, mail, created) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => 7 [:db_insert_placeholder_1] => me@website.com [:db_insert_placeholder_2] => 1488823419 ) in drupal_write_record() (line 7376 of C:\wamp\www\drupal\includes\common.inc).

It appears that the registration is trying to create a user account but cant because the name field that a new user needs is blank as the registration field is not supplying this?

For now Im reverting to 7.16 as this works ok for anon user registration.

Sorry Im not technical enough to provide a fix but happy to test any patches etc..

Comments

kevster created an issue. See original summary.

john.oltman’s picture

Status: Active » Closed (outdated)