Skip to content

[5.x]: Forced logout after creating and deleting a section in a fresh 5.5.3 installation. Unable to log in again #16230

@ardaayyurek

Description

@ardaayyurek

What happened?

Description

After performing a fresh Craft CMS 5.5.3 installation or upgrade from prior versions, after creating a new section and delete it, the system forces the user to log out. Once logged out, the user is unable to log in again, and running the craft users/list-admins command in the CLI shows zero admin users, even though the user still exists in the database.

Issue also happens when you create many sections and entry types and entries. When you delete a section, it forces log out. After creating a new admin user and logging in, entries, assets, and global sets disappear, and while entries can be recovered from the trash, global sets and their data cannot be recovered. Matrix field data and assets are also not recoverable.

I couldn't reproduce the issue with fresh 5.4.3 and 5.5.0 installations. It happens only with 5.5.2 and 5.5.3 installations or when upgrading from prior versions to 5.5.2 or 5.5.3.

Steps to reproduce

  1. Install Craft CMS 5.5.3
  2. Create a section, name it home. Create an entry type name it homepage. Save
  3. Delete the "home" section (Single).
  4. Click any navigation link on the side bar.
  5. The system forces you to log out. Attempt to log back in, but you are unable to log in.
  6. Run the command craft users/list-admins in the CLI, and it shows zero admin users, even though the user exists in the database.

Expected behavior

System should allow users to delete sections.

Actual behavior

  • Deleting the section forces the user to log out.
  • Unable to log back in after being logged out.
  • Running craft users/list-admins shows zero admin users, despite the user being present in the database.
  • Entries can be recovered from trash, but global sets and their data cannot be recovered.
  • Matrix relations and assets are missing and cannot be restored.
  • No other sections or entry types are affected.

Craft CMS version

5.5.3

PHP version

8.3

Operating system and version

MacOS Monterey 12.5.1

Database type and version

PostgreSQL 16.4 and 16.2

Image driver and version

No response

Installed plugins and versions

Fresh installation with no plugins

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions