diff --git a/app/Actions/ActivityService.php b/app/Actions/ActivityService.php
index e6b004f01..4e5b1f365 100644
--- a/app/Actions/ActivityService.php
+++ b/app/Actions/ActivityService.php
@@ -3,6 +3,7 @@
use BookStack\Auth\Permissions\PermissionService;
use BookStack\Auth\User;
use BookStack\Entities\Entity;
+use Illuminate\Database\Eloquent\Relations\Relation;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
@@ -104,7 +105,9 @@ class ActivityService
$activity = $this->permissionService
->filterRestrictedEntityRelations($query, 'activities', 'entity_id', 'entity_type')
->orderBy('created_at', 'desc')
- ->with(['entity', 'user.avatar'])
+ ->with(['entity' => function (Relation $query) {
+ $query->withTrashed();
+ }, 'user.avatar'])
->skip($count * ($page - 1))
->take($count)
->get();
diff --git a/resources/views/partials/activity-item.blade.php b/resources/views/partials/activity-item.blade.php
index 4fd8dde1b..eebfb591a 100644
--- a/resources/views/partials/activity-item.blade.php
+++ b/resources/views/partials/activity-item.blade.php
@@ -16,10 +16,14 @@
{{ $activity->getText() }}
- @if($activity->entity)
+ @if($activity->entity && is_null($activity->entity->deleted_at))
{{ $activity->entity->name }}
@endif
+ @if($activity->entity && !is_null($activity->entity->deleted_at))
+ "{{ $activity->entity->name }}"
+ @endif
+
@if($activity->extra) "{{ $activity->extra }}" @endif