diff --git a/src/Actions/Delete.php b/src/Actions/Delete.php index 3bf21c8c83..6270c3f504 100644 --- a/src/Actions/Delete.php +++ b/src/Actions/Delete.php @@ -17,6 +17,8 @@ public function visibleTo($item) { switch (true) { case $item instanceof Contracts\Entries\Entry && $item->collection()->sites()->count() === 1: + return ! $item->page()?->isRoot(); + break; case $item instanceof Contracts\Taxonomies\Term: case $item instanceof Contracts\Assets\Asset: case $item instanceof Contracts\Assets\AssetFolder: diff --git a/src/Actions/DeleteMultisiteEntry.php b/src/Actions/DeleteMultisiteEntry.php index 32574e264e..78ef6bd8d0 100644 --- a/src/Actions/DeleteMultisiteEntry.php +++ b/src/Actions/DeleteMultisiteEntry.php @@ -9,8 +9,11 @@ class DeleteMultisiteEntry extends Delete { public function visibleTo($item) { - return $item instanceof Entry - && $item->collection()->sites()->count() > 1; + if (! ($item instanceof Entry && $item->collection()->sites()->count() > 1)) { + return false; + } + + return ! $item->page()?->isRoot(); } public function fieldItems()