Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't reorder entries in a collection with the word collection #4495

Closed
jasonvarga opened this issue Oct 15, 2021 · 4 comments · Fixed by #4978 or #6371
Closed

Can't reorder entries in a collection with the word collection #4495

jasonvarga opened this issue Oct 15, 2021 · 4 comments · Fixed by #4978 or #6371
Assignees

Comments

@jasonvarga
Copy link
Member

Bug description

As discussed in #4481, reordering doesn't work. Turns out this only happens if the collection has the word collection in it.

How to reproduce

Create a collection named my_collection with max_depth of 1.
Create a few entries.
Reorder them.
See the order not stick.

Repeat with a collection without the word collection.. like... stuff.
See the order stick.

Logs

No response

Versions

Statamic 3.2.x-dev Pro
Laravel 8.64.0
PHP 8.0.11
No addons installed

Installation

Other (please explain)

Additional details

No response

@brendanfalkowski
Copy link

@jasonvarga — Is it possible there was a regression on this issue? I have the same config + outcome as the original bug using:

Statamic 3.3.23 Pro
Laravel 9.16.0
PHP 8.1.6
No addons installed

I just renamed a collection to (handle = collection), and it's not saving after manual reordering in the CP.

Originally, this collection had (handle = metal) and sorting worked, but I needed to rework it with a taxonomy for extra categorization. After changing over, I thought maybe manual sorting doesn't apply when filtering by taxonomy, but then I found the existing ticket.

This is my tag, which isn't sorting with/without sort or taxonomy attributes:

{{ collection:collection as="item" sort="order:desc" taxonomy:category="metal-sculpture" }}

@jasonvarga
Copy link
Member Author

Yup.

@jasonvarga jasonvarga reopened this Jul 23, 2022
@jasonvarga
Copy link
Member Author

Looks like the initial fix only fixed when you had collection within the handle. Like my_collection. But having the handle of only collection was still broken.

@brendanfalkowski
Copy link

Great, thanks! Glad it was an easy one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants