Laravel-Backpack / activity-log

MIT License
23 stars 6 forks source link

[Bug] Show soft deleted item info #11

Closed tabacitu closed 1 year ago

tabacitu commented 1 year ago

Bug report

What I did

Created an article, the activity shows up in the table (good): CleanShot 2023-08-29 at 09 52 50@2x

Then I deleted that article.

What I expected to happen

I expected:

What happened

CleanShot 2023-08-29 at 09 55 43@2x

tabacitu commented 1 year ago

The behaviour above makes the activity log useless for (in my opinion) the most important use case... tracking when someone has soft deleted something. So I think it's important we support this.

tabacitu commented 1 year ago

Ok so... after using this package a little more time... and Spatie's ActivityLog too... it turns out that the spatie config includes an option saying:

    /*
     * If set to true, the subject returns soft deleted models.
     */
    'subject_returns_soft_deleted_models' => false,

By default it's false. Set it to true and it will do exactly what I expected.


So this isn't an actual bug, we can close it. But I'm sure someone will ask the same thing, so let's keep this in mind.

tabacitu commented 1 year ago

While this is true, if you're using <L10.2 you can't have BOTH soft-deleted and normal-deleted models in your list view 🤦‍♂️ See https://github.com/Laravel-Backpack/activity-log/issues/16 for details.

Closing this, as it's not an actual issue. That ☝️ is.