-
-
Notifications
You must be signed in to change notification settings - Fork 530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CP collection listing can be broken if a user is deleted #2398
Comments
I have this behaviour on a complete fresh install. No user was deleted. If I click on collections in the cp I get this error. EDIT: Same on blueprints in the cp PHP: 7.4.9 |
What should happen instead if the user doesn't exist, should it just display as nothing? I'm thinking about creating a bug fix for this. |
Yes it should just null out the author, and the next time the entry is saved it'll get removed from the data |
My guess is the answer lies in here: https://github.com/statamic/cms/blob/master/src/Fieldtypes/Users.php#L68-L77 But i've been wrong many times before 😂 |
Sweet, I'll have a look over the weekend 😃 |
Fixed in db9968c |
Bug Description
If you have a
users
field (e.g.author
) and add it to your listing column for the collection, the listing will break if you delete a user that has been assigned to an entry.You'll get a
Call to member function id() on null
error on the page.Environment
Statamic version: 3.0.7
PHP version: 7.4
Install method (choose one):
statamic/statamic
The text was updated successfully, but these errors were encountered: