Skip to content

Commit

Permalink
[4.x] Fix too many redirects on collection (#9318)
Browse files Browse the repository at this point in the history
  • Loading branch information
aerni authored Jan 15, 2024
1 parent 801e954 commit 4445c17
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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]));
}
}
}

0 comments on commit 4445c17

Please sign in to comment.