silverstripe / silverstripe-admin

Silverstripe Admin Component
BSD 3-Clause "New" or "Revised" License
25 stars 91 forks source link

"Manage roles" link in CMS returns Invalid Model Class #1700

Closed mandrew closed 3 months ago

mandrew commented 3 months ago

Module version(s) affected

5.0.4

Description

When clicking on the "manage roles" link inside of groups > roles, the redirect returns the error below.

SilverStripe log error: Uncaught Exception RuntimeException: "ModelAdmin::init(): Invalid Model class show" at /var/www/html/vendor/silverstripe/admin/code/ModelAdmin.php line 164 {"exception":"[object] (RuntimeException(code: 0): ModelAdmin::init(): Invalid Model class show at /var/www/html/vendor/silverstripe/admin/code/ModelAdmin.php:164)"} []

How to reproduce

Possible Solution

No response

Additional Context

No response

Validations

Acceptance criteria

Notes

PRs

installer CI run

maxime-rainville commented 3 months ago

That's a CMS 5 only bug. CMS 4 is fine.

We re-factored Security Admin to be plain ModelAdmin in CMS 5. That's probably when this thing got broken.

Honestly, I didn't even know this tab could exists on the Group form ... it only shows if you have at least one role define.

maxime-rainville commented 3 months ago

The UI for this features is just weird.

emteknetnz commented 3 months ago

Linked PRs have been merged, they will be automatically tagged shortly - note they target CMS 5.1 not 5.0 which was the version originally reported, so you may need to upgrade