New profile on registration form throw an error

Created on 9 November 2023, about 1 year ago
Updated 25 November 2023, 12 months ago

Problem/Motivation

Profile 1.7 and drupal 10.1.6
Inside a register form with profile, after upgrading to D10, the profile can't be save anymore.

It seems like the profile is created before the user, this could explain the "uid cannot be null"

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] => dce9e93d-959a-45b6-92ab-50fc5040f8e3 [:db_insert_placeholder_3] => 1 [:db_insert_placeholder_4] => [:db_insert_placeholder_5] => 0 [:db_insert_placeholder_6] => a:0:{} [:db_insert_placeholder_7] => 1699544958 [:db_insert_placeholder_8] => 1699544958 ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 817 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php). 

Steps to reproduce

Add profiles inside the registration form in the backend

πŸ› Bug report
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024