thedevdojo / voyager

Voyager - The Missing Laravel Admin
https://voyager.devdojo.com
MIT License
11.78k stars 2.67k forks source link

Error 500 when order BREAD #5268

Closed cotiga closed 3 years ago

cotiga commented 3 years ago

Version information

Description

In a simple model (without relationship), I encounter an 500 error when I want to order the items ERROR : Unknown column 'parent_id' in 'field list' The Model don't have a parent_id field

Screenshots

See error after reordering capt-ecran 2021-03-20 à 17 03 10

cotiga commented 3 years ago

I added the "parent_id" field in the DB and it's OK Why we can add the ORDER function when this field doesnt exist and it is necessary?

emptynick commented 3 years ago

This is the only place where any data is set when ordering (and there is no hardcoded parent_id): https://github.com/the-control-group/voyager/blob/1.4/src/Http/Controllers/VoyagerBaseController.php#L854

Any chance you can post the whole stacktrace? You might find more information in the network tab of your browser.

cotiga commented 3 years ago

Thank you Emptynick I delved deeper and realized that the controller was using the updateOrder syntax while it must be update_order, also in the Router. I use an up-to-date Fork, I need to control it all Sorry for the inconvenience

github-actions[bot] commented 1 year ago

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.