From 4445c177b5078d3311463a98ddf97d5dcf36fde4 Mon Sep 17 00:00:00 2001 From: Michael Aerni Date: Mon, 15 Jan 2024 10:14:29 -0500 Subject: [PATCH] [4.x] Fix too many redirects on collection (#9318) --- src/Http/Controllers/CP/Collections/CollectionsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Controllers/CP/Collections/CollectionsController.php b/src/Http/Controllers/CP/Collections/CollectionsController.php index 6d76e81e23..1a6919fe06 100644 --- a/src/Http/Controllers/CP/Collections/CollectionsController.php +++ b/src/Http/Controllers/CP/Collections/CollectionsController.php @@ -574,7 +574,7 @@ protected function getAuthorizedSitesForCollection($collection) protected function ensureCollectionIsAvailableOnSite($collection, $site) { if (Site::hasMultiple() && ! $collection->sites()->contains($site->handle())) { - return redirect()->back()->with('error', __('Collection is not available on site ":handle".', ['handle' => $site->handle])); + return redirect(cp_route('collections.index'))->with('error', __('Collection is not available on site ":handle".', ['handle' => $site->handle])); } } }