You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ActionEvent model sets the default created_at and updated_at attributes to new DateTime object in forSoftDeleteAction() (L251), forResourceDetach() (L286) and defaultAttributes() (L357). ActionEvent then uses static::insert() in createForModels() (L317) to persist new models. static::insert(), however, foregoes attribute casting, and escape() called from substituteBindingsIntoRawSql() of \Illuminate\Database\Query\Grammars\Grammar fails with the stack trace below.
This appears to be a new behaviour in my project, and possibly caused by recent Laravel package updates.
As a temporary workaround, I override the ActionEvent model class implementation via ActionResource specified in config/nova.php where I explicitly cast those dates, e.g.:
Please provide full reproducing repository based on fresh installation as suggested in the bug report template (or you can refer to https://github.com/nova-issues for example)
We're closing this issue because it's inactive, already solved, old, or not relevant anymore. Feel free to open up a new issue if you're still experiencing this problem.
Description:
ActionEvent model sets the default created_at and updated_at attributes to new DateTime object in forSoftDeleteAction() (L251), forResourceDetach() (L286) and defaultAttributes() (L357). ActionEvent then uses static::insert() in createForModels() (L317) to persist new models. static::insert(), however, foregoes attribute casting, and escape() called from substituteBindingsIntoRawSql() of \Illuminate\Database\Query\Grammars\Grammar fails with the stack trace below.
This appears to be a new behaviour in my project, and possibly caused by recent Laravel package updates.
As a temporary workaround, I override the ActionEvent model class implementation via ActionResource specified in config/nova.php where I explicitly cast those dates, e.g.:
If any of this appears misguided, I would appreciate any hints as to where to look to fix this casting issue; I may be missing something obvious.
Detailed steps to reproduce the issue on a fresh Nova installation:
Add any action to a resource in Nova (ensuring $withoutActionEvents is set to false). Invoke the action from the UI and watch it fail.
The text was updated successfully, but these errors were encountered: