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

Reorder issue. #368

Open
JesperFiltenborg opened this issue Oct 25, 2024 · 6 comments · May be fixed by #377
Open

Reorder issue. #368

JesperFiltenborg opened this issue Oct 25, 2024 · 6 comments · May be fixed by #377
Labels
bug Something isn't working

Comments

@JesperFiltenborg
Copy link

Bug description

Hey,
I've gotten a site for a customer running Statamic 4 and Statamic eloquent driver.
The site has been migrated from a Statamic 3 with Statamic eloquent driver.

The problem i really odd.
I've got a collection using reorder with a max depth of 1.
When i reorder I can see that my database tree is updated but the order on the entries in the database say the same.
If i change the max depth to 0 / blank it works as expected.

I do not know if this is an actual bug or if it's a problem that happened during the migration.

How to reproduce

I cannot reproduce it on a fresh install, but hope to get some help either in this thread or through a discord call.

Logs

No response

Environment

Environment
Application Name: *********
Laravel Version: 10.48.12
PHP Version: 8.2.22
Composer Version: 2.7.7
Environment: local
Debug Mode: ENABLED
URL: *********.ddev.site
Maintenance Mode: OFF

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

Drivers
Broadcasting: log
Cache: redis
Database: mysql
Logs: daily
Mail: smtp
Queue: sync
Session: redis

Statamic
Addons: 6
Antlers: runtime
Sites: 2 (Danish, English)
Stache Watcher: Disabled
Static Caching: Disabled
Version: 4.58.2 PRO

Statamic Addons
doublethreedigital/duplicator: 4.0.1
jacksleight/statamic-bard-mutator: 2.3.0
pecotamic/sitemap: 1.4.6
statamic/eloquent-driver: 3.4.1

Statamic Eloquent Driver
Asset Containers: file
Assets: eloquent
Blueprints: file
Collection Trees: file
Collections: eloquent
Entries: eloquent
Forms: eloquent
Global Sets: eloquent
Global Variables: file
Navigation Trees: file
Navigations: eloquent
Revisions: eloquent
Taxonomies: file
Terms: eloquent

Additional details

No response

@JesperFiltenborg JesperFiltenborg added the bug Something isn't working label Oct 25, 2024
@ryanmitchell
Copy link
Contributor

Is there any reason you can't update the site to v5 and the latest eloquent driver version?

@JesperFiltenborg
Copy link
Author

JesperFiltenborg commented Oct 28, 2024

@ryanmitchell
I've got a version of Statamic 5 running on a development environment, but I experience the same bug with reorder on v5.

@ryanmitchell
Copy link
Contributor

You had previously said you dont encounter the error on a fresh install - is this no longer the case?

When i reorder I can see that my database tree is updated but the order on the entries in the database say the same.

can you explain what this means - with some screenshots or examples of the difference in output versus what you were expecting?

@JesperFiltenborg
Copy link
Author

@ryanmitchell on a fully fresh Statamic install in the newest version i don't encounter this issue.
When i debug the code i can see that my database is updated to the correct order in the "trees" table but that the order on the "entries" table is not updated.
It looks like Statamic trying to update the order on the Entries through jobs running via horizon. But this should not be the problem due to the reorder not working in sync mode either.
Can we perhaps find a time for a discord call, and i can screen share the issue.

@ryanmitchell
Copy link
Contributor

Yes the reordering uses a job. Interesting that it works fine on a new install.
Feel free to reach out on discord and we can set something up.

@ryanmitchell ryanmitchell linked a pull request Nov 13, 2024 that will close this issue
@ryanmitchell
Copy link
Contributor

I think #377 should solve this. It seems to have not been noticed before as it only happens on queues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants