laravel / nova-issues

554 stars 34 forks source link

Action class always returns 1 model, regardless of the items the user selects #6520

Closed sacriley closed 1 month ago

sacriley commented 2 months ago

Description:

I can only retrieve one item for my action when selecting multiple items on the index page, unless I update Laravel Nova to version 4.34.3.

I searched for the problem. this class should be fixed: \Laravel\Nova\Http\Requests\ActionRequest::toSelectedResourceQuery

It always returns 1 model, regardless of the items the user selects: $this->toQueryWithoutScopes()->whereKey(explode(',', $this->resources))

webard commented 2 months ago

Same problem in my app with newest version of Nova.

crynobone commented 2 months ago

Our dusk tests is still passing with no error at this point. Yes the frontend code has been changed but as long as you not overriding the default and update the assets during the upgrade you should be fine.

crynobone commented 2 months ago

Unable to reproduce the issue, 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)

marcin-tazbir commented 2 months ago

I can confirm we've been experiencing the same issue since we updated to the newest version. Recompiling assets didn't help either.

tobidotYD commented 1 month ago

I had the same issue, but like @crynobone said, doing

php artisan nova:publish
php artisan view:clear

Solved the issue it seems.

crynobone commented 1 month ago

Hey there,

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 with reproduction repository as requested above.