SiteGroupEntity Error Updating 8.4.4 Site

I tried updating a site running 8.4.4 to 8.5.15 in preparation of updating to V9 afterwards. I used the manual update method, as 8.4.4 didn’t have the ability to update from the UI.

I’ve done Concrete updates many times, with no issue.

This time I am getting an error saying:

An unexpected error occurred.
Class Concrete\Core\Permission\Access\Entity\SiteGroupEntity does not exist

I can’t get past that to login to see the error reporting.

Can you run this command from the CLI and see if that fixes it?

concrete/bin/concrete5 c5:entities:refresh

I got this error:

An exception occurred while executing ‘ALTER TABLE ExpressEntityAssociationSelectedEntries ADD CONSTRAINT FK_1F9C570CBF396750 FOREIGN KEY (id) REFERENCES ExpressEntityEntryAssociations (id)’:

SQLSTATE[HY000]: General error: 1005 Can’t create table REDACTED_TABLE.ExpressEntityAssociationSelectedEntries (errno: 121 “Duplicate key on write or update”)

Sounds like you might have some bad data in your express entities. I’m not sure how to fix that.

Are you able to post your environment info here? Wondering if some migrations might not have run during the update or something and it might give us some clues.