Cannot add new user when Customer Profile settings "Include in user registration form."

Created on 3 May 2019, over 5 years ago
Updated 6 June 2019, over 5 years ago

When I check "Include in user registration form" under a customer profile (/admin/config/people/profiles/manage/customer), this causes the “The website encountered an unexpected error. Please try again later.” error when trying to "Add new user" either under “/admin/people/create” or “user/register”. I can add a user via the commerce portal, but not all users are buyers. Admin has no control over "Adding New User" to its own "People" section unless I uncheck "Include in user registration form", which I don't want to do.

I am using D8.6.15. Immediate help would be greatly appreciated.

🐛 Bug report
Status

Closed: cannot reproduce

Version

1.0

Component

User interface

Created by

🇺🇸United States utcbrij

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇧🇬Bulgaria joro78

    We have the same problem on two sites. When enabling the customer profile on registration we receive an error.

    We cannot add users neither on the standard way, nor when user tries to register after making an order.

    System is Drupal 10.1.7
    10.3.39-MariaDB
    PHP 8.1.27
    Multilingual system

    Errors when trying to create user with enable in the registration form profile:

    https://domain.ext/bg/checkout/4/complete

    Drupal\Core\Entity\EntityStorageException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'uid' cannot be null: INSERT INTO "profile" ("revision_id", "type", "uuid", "status", "uid", "is_default", "data", "created", "changed") 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); Array ( [:db_insert_placeholder_0] => [:db_insert_placeholder_1] => customer [:db_insert_placeholder_2] => 434660fd-7d1a-4550-a89d-15c49ba69165 [:db_insert_placeholder_3] => 1 [:db_insert_placeholder_4] => [:db_insert_placeholder_5] => 0 [:db_insert_placeholder_6] => a:0:{} [:db_insert_placeholder_7] => 1704815967 [:db_insert_placeholder_8] => 1704815967 ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 817 of /var/www/domain.ext/public_html/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

    https://domain.ext/bg/admin/people/create

    Drupal\Core\Entity\EntityStorageException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'uid' cannot be null: INSERT INTO "profile" ("revision_id", "type", "uuid", "status", "uid", "is_default", "data", "created", "changed") 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); Array ( [:db_insert_placeholder_0] => [:db_insert_placeholder_1] => customer [:db_insert_placeholder_2] => 699cdefb-d987-4771-97aa-b05a3a192a9f [:db_insert_placeholder_3] => 1 [:db_insert_placeholder_4] => [:db_insert_placeholder_5] => 0 [:db_insert_placeholder_6] => a:0:{} [:db_insert_placeholder_7] => 1704816118 [:db_insert_placeholder_8] => 1704816118 ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 817 of /var/www/domain.ext/public_html/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

Production build 0.71.5 2024