Database error

I noticed after updating to 9.2 I am getting the following database error when refreshing database entities;
An exception occurred while executing ‘ALTER TABLE GroupSignups ADD CONSTRAINT FK_D6CC4ECBFD71026C FOREIGN KEY (uID) REFERENCES Users (uID) ON DELETE SET NULL’: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (juwatero_juwater.#sql-alter-357911-201bf57, CONSTRAINT FK_D6CC4ECBFD71026C FOREIGN KEY (uID) REFERENCES Users (uID) ON DELETE SET NULL)

it appears to be a user error or a user can’t be found in the database. Any ideas on how to correct the error. I also get the following error when the admin tries to get “work waiting for me” from the daseboard; Exception Occurred: /home/juwatero/public_html/updates/concrete-cms-9.2.0/concrete/vendor/doctrine/orm/lib/Doctrine/ORM/Exception/MissingIdentifierField.php:13 The identifier uID is missing for a query of Concrete\Core\Entity\User\User (0)

@mmaheux Yeah that is strange - do you know if you did any database surgery on this that might’ve neglected to delete a user from a set?

You might see if you can see what uID it’s looking for and where. Looks like it might be trying to delete a user set maybe?

I have the exact same problems, also can’t install add ons because of this, did you find any solutions?

Hi @roihu - can you post your error please?

Also random question - do you have any workflows enabled?

Hi @EvanCooper , I found out what was causing the problems. Been running this Concrete CMS since 2021 and probably had two users that I deleted, but for some reason there was two rows left in database (UserGroups). Added two users straight to database (Users) that mached the uID’s of the leftover ones in UserGroups.

After that I used Concrete CMS to normally remove those two users just to be sure they are removed properly. So now it works properly. :slight_smile:

can someone tell me what the user id for the super user in the database ->User uID=?
Sill trying to find the error and it has to do with the super administrator
Thank you for help

It should be 1 (one). In the core, it’s defined as USER_SUPER_ID

$u = $app->make(\Concrete\Core\User\User::class);  // or $u = new User();
if ($u->isSuperUser()) {
    echo 'You are Superman ;)';

This probably should be a separate Topic, instead of tacked onto this one…