Problem/Motivation

Integrity constraint violation: 1048 Column 'name' cannot be null: INSERT INTO "users_field_data".

Drupal\Core\Entity\EntityStorageException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'name' cannot be null: INSERT INTO "users_field_data" ("uid", "langcode", "preferred_langcode", "preferred_admin_langcode", "name", "pass", "mail", "timezone", "status", "created", "changed", "access", "login", "init", "default_langcode") 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, :db_insert_placeholder_13, :db_insert_placeholder_14); Array ( [:db_insert_placeholder_0] => 0 [:db_insert_placeholder_1] => en [:db_insert_placeholder_2] => en [:db_insert_placeholder_3] => [:db_insert_placeholder_4] => [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => [:db_insert_placeholder_7] => America/New_York [:db_insert_placeholder_8] => 0 [:db_insert_placeholder_9] => 1492627108 [:db_insert_placeholder_10] => 1492627108 [:db_insert_placeholder_11] => 0 [:db_insert_placeholder_12] => 0 [:db_insert_placeholder_13] => [:db_insert_placeholder_14] => 1 ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 817 of /app/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

Steps to reproduce

  • Install next modules:
    • Group
    • Group invite
    • Email registration
  • Enable group content invite
  • Try to invite anonymous user by email

Comments

blade_ukraine created an issue. See original summary.

blade_ukraine’s picture

Here is the simplest solution.

blade_ukraine’s picture

Status: Active » Needs review
Related issues: +#3371250: I want to send an invitation, I get an error after submit
anybody’s picture

@blade_ukraine could you explain more in detail how it's possible to create an account for an anonymous user? Which means without name?

This module will always create a replacement for the name.

blade_ukraine’s picture

Issue summary: View changes
anybody’s picture

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

blade_ukraine’s picture

I'm just wondering how the report created earlier may be marked as a duplicate. However, never mind.