Laravel-Backpack / PermissionManager

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

Roles index page doesn't load properly. #319

Closed imtiazmahbub closed 1 year ago

imtiazmahbub commented 1 year ago

Bug report

What I did:

Installed the package as instructed.

What I expected to happen:

The index page of Roles load properly.

What happened:

Got the error: SQLSTATE[HY093]: Invalid parameter number

select count(*) as total_rows from (select `roles`.`id`, (select count(*) from `users` inner join `model_has_roles` on `users`.`id` = `model_has_roles`.`model_id` where `roles`.`id` = `model_has_roles`.`role_id` and `model_has_roles`.`model_type` = ?) as `users_count` from `roles`) as `roles_aggregator`

What I've already tried to fix it:

Looked into the relationships. It seems the query expects to have some data on model_has_roles table. But couldn't figure out anything more that could help me fix the issue.

Backpack, Laravel, PHP, DB version:

Backpack: 5 Laravel: 9 PHP: 8.1.2 DB: MySQL 8.0.28 GPL

welcome[bot] commented 1 year 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 1 year ago

Hey there, please make sure you are using the latest crud version. That issue was fixed some versions ago.

You can do a php artisan backpack:version to get the installed version.

Let me know.

pxpm commented 1 year ago

Closing due to inactivity.

Hope you had it figured out by now 🙏

If not, please re-open!

Cheers

AlexisTak commented 1 year ago

Hello re-open ticket for the same problem. Here is the info to ask

image