statamic / eloquent-driver

Provides support for storing your Statamic data in a database, rather than flat files.
https://statamic.dev/tips/storing-content-in-a-database
MIT License
104 stars 71 forks source link

Reorder collection does not working #260

Open potsky opened 3 months ago

potsky commented 3 months ago

Hi !

We have the same problem as in https://github.com/statamic/eloquent-driver/issues/43 but with version 3.3.2 on Statamic 4.54.0. updated_at field of the reordered entries is not touched.

https://github.com/statamic/eloquent-driver/assets/408237/601045e1-428a-4965-a143-0c6bafb168da

ryanmitchell commented 3 months ago

Can you paste the result of php please support:details. My guess is you are using flat file collections and eloquent entries?

potsky commented 3 months ago

Can you paste the result of php please support:details. My guess is you are using flat file collections and eloquent entries?

Indeed 👍

❯ sail php please support:details

Environment
Application Name: CMS
Laravel Version: 10.48.4
PHP Version: 8.2.17
Composer Version: 2.7.2
Environment: local
Debug Mode: ENABLED
URL: localhost
Maintenance Mode: OFF

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: pusher
Cache: redis
Database: pgsql
Logs: stack / stderr, sentry
Mail: smtp
Queue: redis
Session: redis

Locales
Installed: en, fr
LaravelLang\Lang\Plugin: 14.7.0
Locales Version: 2.6.0
Protected: en, fr
Publisher Version: 16.3.0

Livewire
Livewire: v3.4.9

Sentry
Enabled: MISSING DSN
Environment: local
Laravel SDK Version: 4.4.0
PHP SDK Version: 4.6.1
Release: NOT SET
Sample Rate Errors: 100%
Sample Rate Performance Monitoring: 100%
Sample Rate Profiling: 100%
Send Default PII: DISABLED

Statamic
Addons: 6
Antlers: runtime
Sites: 2 (Français, English)
Stache Watcher: Enabled
Static Caching: Disabled
Version: 4.54.0 PRO

Statamic Addons
appswithlove/statamic-one-click-content-translation: 4.62.0
jacksleight/statamic-bard-mutator: 2.3.0
ryanmitchell/statamic-translation-manager: 1.4.1
sirenergies/images-missing-alt-widget: dev-main
statamic/collaboration: 0.8.1
statamic/eloquent-driver: 3.3.2

Statamic Eloquent Driver
Asset Containers: file
Assets: eloquent
Blueprints: file
Collection Trees: eloquent
Collections: file
Entries: eloquent
Forms: file
Global Sets: file
Global Variables: eloquent
Navigation Trees: eloquent
Navigations: file
Revisions: eloquent
Taxonomies: files
Terms: eloquent
ryanmitchell commented 3 months ago

@jasonvarga this is the issue I mentioned a while back (similar to https://github.com/statamic/eloquent-driver/issues/220) that comes from collections and entries being on split configurations.

When the order is saved the Stache collection tree is being updated, not the order column on the entry model, so the entry is never updated.

I'm not sure that this can be solved without changes in core?