Skip to content

Reordering a collection doesn't persist after save #3620

@moacode

Description

@moacode

Bug Description

When I reorder a collection, it is is reverted back once I click save, even though a "Entries successfully reordered" message is shown.

How to Reproduce

  1. Create a collection
  2. Edit the collection and make sure Orderable is ticked on and Max Depth is set to 1
  3. Add a couple of entries
  4. Reorder the entries, click save, and the order should revert

Extra Detail

We are running Statamic with the Eloquent driver as we are unable to use the flat file system with our Kubernetes setup in production. We are using MySQL version 5.7.

I noticed a collection yaml file containing UID's of the entries is being written to with the correct order, however this doesn't seem to be used as we're using the Eloquent driver? Also, even if the CMS was picking up the changes from the yaml file, it wouldn't work in production due to hosting constraints. We ideally need the order stored as a column in the database.

Screen Shot 2021-04-30 at 9 21 05 AM

Video of the issue in action

statamic-reordering.mp4

Environment

Statamic version: 3.1.11

PHP version: 7.4.11

MySQL version: 5.7.26

Install method (choose one):

  • Fresh install from statamic/statamic

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions