-
Notifications
You must be signed in to change notification settings - Fork 34
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 doesn't work if applied to resource that is found via index search #6518
Comments
Hi @bosniakus , thanks for reporting this. Please share a sample reproducing repo or code example of how you have set those two models and the mentioned action 🙏 |
Hello @jeremynikolic , Here is bare minimum repository where you are able to reproduce this issue/bug : https://github.com/bosniakus/laravel-nova-action-bug Steps to reproduce:
Let me know if you need more information. |
Thanks @bosniakus I'll be looking into it 🕵️ |
Thanks to your repo, I've managed to reproduce the issue, investigating the root cause of it 🕵️ |
Root cause found, further testing on the fix in progress ⏳ |
Description:
I have model 'Category' and action 'Add parent to category' which have 'Parent' field (BelongsTo). Everything is set up correctly and it works as intended. If, for example, I choose category 'Aston Martin' and add parent category 'Car' to it via action 'Add parent to category' it works.
/resources/categories?categories_page=1 - Action on this URL does work!
Issue appear when I use index table search field. Once resources I want to use action on are found, action does not work with error message "This Parent may not be associated with this resource."
/resources/categories?categories_page=1&categories_search=aston+martin - Action on this URL does NOT work
This error message is pretty consistent. I tried to refresh page, to select different parent category without luck.
Detailed steps to reproduce the issue on a fresh Nova installation:
The text was updated successfully, but these errors were encountered: