Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sacriley opened this issue Sep 6, 2024 · 6 comments
Closed
Labels
needs more info More information is required

Comments

@sacriley
Copy link

sacriley commented Sep 6, 2024

  • Laravel Version: 10.11.2
  • Nova Version: 4.35.0
  • PHP Version: 8.3
  • Database Driver & Version:
  • Operating System and Version: CentOS
  • Browser type and version: Chrome latest
  • Reproduction Repository: https://github.com/###/###

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
Copy link

webard commented Sep 6, 2024

Same problem in my app with newest version of Nova.

@crynobone
Copy link
Member

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 crynobone added the needs more info More information is required label Sep 6, 2024
@crynobone
Copy link
Member

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
Copy link

marcin-tazbir commented Sep 6, 2024

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

@tobidotYD
Copy link

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

php artisan nova:publish
php artisan view:clear

Solved the issue it seems.

@crynobone
Copy link
Member

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.

@crynobone crynobone closed this as not planned Won't fix, can't repro, duplicate, stale Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more info More information is required
Projects
None yet
Development

No branches or pull requests

5 participants