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

Issues when using with Octane and Duplicates item #190

Open
g124578g opened this issue Nov 2, 2023 · 2 comments
Open

Issues when using with Octane and Duplicates item #190

g124578g opened this issue Nov 2, 2023 · 2 comments

Comments

@g124578g
Copy link

g124578g commented Nov 2, 2023

The first issue is that when used with Octane, "move_to_start" and "move_to_end" cannot function correctly, but it works properly when started using "php artisan serve.

The second issue is that when dragging to reorder, duplicate items appear at the bottom. This problem doesn't occur in Safari, but it does in Chrome.

@LuckyLukas98
Copy link

I've also experienced your first issue using Laravel Octane. It seems to somehow be related to the sortable cache.

Adding the public static $sortableCacheEnabled = false; to the resource fixed it for me.

@LuckyLukas98
Copy link

This might be related to the static variable used for caching in the HasSortableRows Trait.

Using Octane this variable will be initialized once, stored in RAM and used for subsequent request, which could explain why moving items to to start or to the end will result in the same order as before.

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

No branches or pull requests

2 participants