Closed jorisvan-ons closed 11 months ago
Can you run php please support:details
and paste the result here?
`Environment Application Name: CENSORED Laravel Version: 9.52.6 PHP Version: 8.2.3 Composer Version: 2.5.1 Environment: local Debug Mode: ENABLED URL: CENSORED Maintenance Mode: OFF
Cache Config: CACHED Events: NOT CACHED Routes: CACHED Views: CACHED
Drivers Broadcasting: log Cache: statamic Database: mysql Logs: stack / single Mail: smtp Queue: sync Session: file
Statamic Addons: 4 Antlers: runtime Stache Watcher: Enabled Static Caching: Disabled Version: 3.4.7 PRO
Statamic Addons doublethreedigital/runway: 4.2.4 mitydigital/iconamic: 1.1.4 octoper/statamic-blade-components: 2.0.0 statamic/eloquent-driver: 1.2.0`
Thanks. Nothing is jumping out at me there. Is your collection dated as well as order able? I wonder if this fix might help: https://github.com/statamic/eloquent-driver/pull/138
No, the collection is not dated. The date fields are all set to NULL in the database.
Here is the yaml file of the collection
title: Products
template: products/show
layout: layouts/app
revisions: false
route: '/products/{slug}'
sort_dir: asc
date_behavior:
past: public
future: private
preview_targets:
-
label: Entry
url: '{permalink}'
structure:
root: false
max_depth: 1
Thanks for the blueprint, I was able to replicate your issue.
However, when I apply the code change in the PR i previously linked: https://github.com/statamic/eloquent-driver/pull/138 then this issue goes away for me.
Thanks for the suggestion. However, applying the code change does not fix the issue for me. The class/method does not seem to be used when I reorder or even try to create a new entry?
Are you able to supply access to a sample repository that shows the issue? I’m unfortunately not able to recreate the issue at this point.
@jorisvan-ons any further update on this? If you have upgraded to 2.1.0 does the issue still exist?
It seems to be fixed in our new projects. Will update old projects to make sure it works with 2.1.0, thanks for your help!
Still not working on 2.1 and 2.2.
Have you tried re-saving the collection config? Or removing the sort field key from the database? There were some issues with sort fields being saved when they shouldn’t.
Closing due to inactivity.
Reordering seems bugged. The values are coming through in the correct order when inspecting the
$reorderedEntries->values()->all()
in theReorderEntriesController
.However, the table is reloaded and the values are back in the old order again. The database 'order' columns to not seem to be updated. Manually changing the order columns does work.