-
Notifications
You must be signed in to change notification settings - Fork 7
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
[Bug] Cannot show entries with both SoftDeletes and regular Deletes in the same List operation #16
Comments
Ok so apparently Spatie is aware of the issue - spatie/laravel-activitylog#456 - and the fix isn't as easy as I thought it would be. The last comment says this is resolved in Laravel 10.20.0. But we should test it before we close this. |
Wow! Just in time of our release 😅 |
We could... in fact we should. But let's please also make a branch with everything BUT the L10 requirement - so we can have it working on backpackforlaravel.com too 😅 Haven't upgraded to L10 yet... 👀😔 |
Hey @tabacitu, getting back to this, I think we don't need to enforce users to use Laravel v10.20.0... Also Laravel v11 has been released... |
Bug report
What I did
I've used ActivityLog on backpackforlaravel.com - over there some models have SoftDeletes, some do not. I changed the spatie config
subject_returns_soft_deleted_models
totrue
, to show the softdeleted activities too. All good - when the table only contained activities pointing to soft-deletin models, everything worked ok.But then... I used one model that did NOT have softdeletes.
What I expected to happen
The entry to show up in the list operation.
What happened
Big fat error
What I've already tried to fix it
I've tried to see what is going wrong. And it looks to me like the problem is in the
subject
column. If I remove that, everything's working. That column is doing$entry->subject
which is defined by spatie onActivity.php:62
asSo from what I can tell... it's a spatie bug, basically. If the config is set to use soft deletes, it will try to use
withTrashed()
on EVERYTHING. It should be something like:The text was updated successfully, but these errors were encountered: