laravel / laravel/nova-issues

Action events do not support UUIDs

Open
#6,922 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
557
Forks
33
PR merge metrics
No merged PRs in 30d

Description

- Laravel Version: 12.31.1
- Nova Version: 5.7.5
- PHP Version: 8.4.13
- Database Driver & Version: MySQL 8.2.0
- Operating System and Version: -
- Browser type and version: -
- Reproduction Repository: -

### Description:
The ``action_events`` table from Laravel Nova does not support UUIDs for the ``actionable_id``. This causes an error when you have a resource with UUID primary keys and you are trying to execute one of the default Nova actions (delete/restore for example).

On your own custom actions you can disable the action log: https://nova.laravel.com/docs/v5/actions/defining-actions#disabling-the-action-log
This should probably also automatically happen on the default Nova actions if the target model has the ``HasUuids`` concern.

### Detailed steps to reproduce the issue on a fresh Nova installation:
1. Create a model + migration with the primary key like this: ``$table->uuid('id')->primary();``
2. Add ``use HasUuids;`` to the model
3. Create a Nova resource for that model
4. Create a record
5. Try to delete the record through the Nova action
6. You will get an error like this:
Image

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the failure with a model using a UUID primary key, the `HasUuids` concern, and a Nova resource, then inspect how the `action_events` table records `actionable_id` for default delete and restore actions. Confirm the expected behavior for UUID-backed resources and verify that the default actions complete without the reported database error.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, mysql, php
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.