From 67f04640a793de314a3353fc3db217fec3381944 Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Mon, 13 Jul 2026 14:16:49 +0100 Subject: [PATCH 1/2] Fix performance issue when duplicating entries in large collections The slug uniqueness check queried by `locale`, which isn't a registered Stache index for entries. On first use it required hydrating every entry file in the collection across all sites to build an ad-hoc index, causing timeouts on large collections. Querying by `site` instead reuses the index that's already warmed by normal CP traffic (e.g. collection listings). --- src/Actions/DuplicateEntry.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Actions/DuplicateEntry.php b/src/Actions/DuplicateEntry.php index 2cf370f25cf..d5b063a5180 100644 --- a/src/Actions/DuplicateEntry.php +++ b/src/Actions/DuplicateEntry.php @@ -162,7 +162,7 @@ protected function generateTitleAndSlug(Entry $entry, $attempt = 1) $slug .= '-'.$attempt; // If the slug we've just built already exists, we'll try again, recursively. - if ($entry->collection()->queryEntries()->where('locale', $entry->locale())->where('slug', $slug)->count()) { + if ($entry->collection()->queryEntries()->where('site', $entry->locale())->where('slug', $slug)->count()) { [$title, $slug] = $this->generateTitleAndSlug($entry, $attempt + 1); } From 276f7abfd83a8ef6b2f0e22cb2b0ba02a0fadab9 Mon Sep 17 00:00:00 2001 From: Jason Varga Date: Mon, 13 Jul 2026 13:20:39 -0400 Subject: [PATCH 2/2] bump