area17 / twill

Twill is an open source CMS toolkit for Laravel that helps developers rapidly create a custom admin console that is intuitive, powerful and flexible. Chat with us on Discord at https://discord.gg/cnWk7EFv8R.
https://twillcms.com
Apache License 2.0
3.72k stars 568 forks source link

Fix server error in the dashboard when a nested module has a deleted parent #2633

Open Tofandel opened 2 months ago

Tofandel commented 2 months ago

If you have a nested module that you want to show in the dashboard, if you trash a parent without soft deleting the subject, then the dashboard throws an error 500 when it tries to display any activity that happened on one of the children of the deleted parent

Missing required parameter for [Route: twill.articleCategories.articles.edit] [URI: admin/articleCategories/{articleCategory}/articles/{article}/edit] [Missing parameter: article]

The error is because the empty parent is ignored and twill tries to use the moduleRoute as if it was a non nested module route, instead of ignoring the record

This PR fixes this issue