platform icon indicating copy to clipboard operation
platform copied to clipboard

Update Screen.php

Open vladitot opened this issue 5 years ago • 5 comments

Incorrect parameters substitution in method like "remove" at UserScreen

vladitot avatar Oct 14 '20 13:10 vladitot

@tabuna hi! I don't really know why no-one more noticed this bug. But there is a problem, when you have Button::method('remove') and public function remove(User $user) User is with empty attributes. That is because first argument on callMethod is "route url". But it should be last argument. I think it was in platform 7.* Or maybe not. So, please, review this request and emit patch please. Have a good day!

vladitot avatar Oct 14 '20 13:10 vladitot

Hey @vladitot. I am not experiencing any problem with deleting users. How can I reproduce your problem?

tabuna avatar Oct 14 '20 13:10 tabuna

I will try show receipt in few hours.

vladitot avatar Oct 14 '20 14:10 vladitot

I'm glad sorry. I found what I lost. My nginx was set up the way, an additional parameter added on each query. Laravel thought that there is one more query parameter, and route parameters were mapping incorrectly. I think my fix in this pull request can save people in same situation, but if there is no same situations - just close my pull request.

vladitot avatar Oct 14 '20 21:10 vladitot

I don't think it needs to be changed now. But I think it would be great to describe the problem and its solution for those who will face it in the future.

tabuna avatar Oct 15 '20 20:10 tabuna