Closed dzandrey closed 5 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)
For context, Nova would only send a string as all
or an array of IDs, so comma separated string is not an expectwd behaviour. This has been tested vja our integration and dusk tests. You need to submit reproduing code to confirm such issue exist.
The usage of selectedResourceIds()
is limited to Action Modal confirmation and not during submission and therefore isn't a bug. You should look at toSelectedResourceQuery()
on how to access it, since all methods here are internal we not making changes to the above method.
Here is the method you're referring to. But it uses toQueryWithoutScopes() from which it takes $resource::detailQuery instead of $resource::indexQuery. In this case, $resource::indexQuery should be triggered because I am calling the action on the list and not on the detail page.
Description:
In Laravel Nova when attempting to retrieve selected resource IDs through the
selectedResourceIds()
method, an issue with incorrect processing of the comma-separated string of identifiers has been discovered.method: selectedResourceIds()
The issue lies in the improper conversion of the string containing identifiers into an array, leading to incorrect logic in determining the number of selected resources and subsequent erroneous invocation of the
detailQuery
orindexQuery
methods in theActionRequest
class.Detailed steps to reproduce the issue on a fresh Nova installation:
Open resource index page and apply any Action to multiple records