You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
500 error from duplicate ID in collection tree following reorder of entries #11209
NB: I'm struggling to recreate this in my dev env. The client has managed to cause the issue a couple of times but not entirely sure what is triggering it.
Steps:
Create a new entry in an orderable collection and publish it.
Reorder the entries and save.
Result: 500 error on front-end that doesn't use custom error template
Only certain users seem to cause this issue:
Their preferences & permissions are the same apart from collection listing columns being displayed
Users on Windows 11 using Chrome.
Workaround seems to be: refresh the collection listing (ie: cmd + r in the browser) after publishing the new entry but before reordering.
Update: I think this is due to the user's choice with the number of entries to include in the pagination in the CP. Users that cause the issue have this set to 50 (default) and there are more than 50 entries in the collection. Changing 100 fixes it.
When this exception is removed the file gets fixed duplicates get removed and you don't get the broken list view.
I'm not sure if this is the correct solution i don't know if there is a specific reasoning for this.
Been fighting this issue on and off this week with my client. And can confirm that the workaround works; set the "per page" to 100 (or probably just more than there are entries).
Activity
wesort commentedon Dec 2, 2024
Update: I think this is due to the user's choice with the number of entries to include in the pagination in the CP. Users that cause the issue have this set to
50(default) and there are more than 50 entries in the collection. Changing100fixes it.JelleGroenendal commentedon Apr 22, 2025
This happens when pagination is enabled on the sort page.
It duplicates all entries on the active page in to to the trees yaml.
When this happens you cant solve it other then removing the duplicates manually.
It can be directed to this specific line:
https://github.com/statamic/cms/blob/5.x/src/Structures/CollectionStructure.php#L72
When this exception is removed the file gets fixed duplicates get removed and you don't get the broken list view.
I'm not sure if this is the correct solution i don't know if there is a specific reasoning for this.
JelleGroenendal commentedon Apr 22, 2025
Problem lies actually in
cms/src/Http/Controllers/CP/Collections/ReorderEntriesController.php
Line 33 in 4e2ca82
marcorieser commentedon Jun 18, 2026
Jup, this is still relevant
aleskozina commentedon Jul 2, 2026
Been fighting this issue on and off this week with my client. And can confirm that the workaround works; set the "per page" to 100 (or probably just more than there are entries).