Laravel-Backpack / PermissionManager

Admin interface for managing users, roles, permissions, using Backpack CRUD
http://backpackforlaravel.com
Other
516 stars 166 forks source link

`Undefined array key "model"` when adding roles to a User #291

Closed olipayne closed 2 years ago

olipayne commented 2 years ago

Bug report

Editing a User with the default UserCrudController provided by this package now throws a Undefined array key "model" error.

What I did:

What I expected to happen:

The User to update successfully

What happened:

https://flareapp.io/share/dmkjLdD5#F60

What I've already tried to fix it:

Backpack, Laravel, PHP, DB version:

Backpack 5.0, Laravel 9.0, MySQL 8.0

welcome[bot] commented 2 years ago

Hello there! Thanks for opening your first issue on this repo!

Just a heads-up: Here at Backpack we use Github Issues only for tracking bugs. Talk about new features is also acceptable. This helps a lot in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that.

Backpack communication mediums:

Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome awesome community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch.

Thank you!

-- Justin Case The Backpack Robot

pxpm commented 2 years ago

closing in favor of https://github.com/Laravel-Backpack/CRUD/pull/4166 . Already reviewed and ready for merge.

Thanks again @olipayne ! 🙏

edrisaturay commented 2 years ago

i still get this error after following the documentation.. I even setup a new project and this error persists.. any help will be highly appreciated..

PHP V 8.1.6 and Laravel 9.19.0

pxpm commented 2 years ago

@edrisaturay and what backpack version you are using ?

Please do: php artisan backpack:version

Cheers

edrisaturay commented 2 years ago

PHP VERSION:

PHP 8.1.6 (cli) (built: May 11 2022 08:55:59) (ZTS Visual C++ 2019 x64) Copyright (c) The PHP Group Zend Engine v4.1.6, Copyright (c) Zend Technologies

LARAVEL VERSION:

v9.21.5@a1944cd0d160a2cc423ef5a451d002711c5f014f

BACKPACK VERSION:

5.2.2@bea3042dceb2bd2a888f67d3782908bced33938a

olipayne commented 2 years ago

@edrisaturay do you have a stack trace you can share? This issue was pretty nicely solved so it might be a similar but unrelated issue.