I love this module, but...on submit, all permissions for unselected roles vs unselected modules has been erased! Any help?

Comments

soulfroys’s picture

Project: Better Permissions » Filter Permissions
Version: 6.x-1.0-beta1 » 6.x-1.1
Component: User interface » Code

Sorry, move to the right module.

soulfroys’s picture

My drupal version: 6.20. I really appreciate any help... It's hard without it :(

cyu’s picture

What other permissions modules are you using? I'm assuming there is some conflict since there are many users successfully using this module. Perhaps try disabling other modules one at a time to see which one is conflicting.

soulfroys’s picture

Thank you for reply! I'm using Better Permissions with it, I disable it, but no sucess... I'll try to write the steps for reprodution. Thanks again!

cyu’s picture

Status: Active » Postponed (maintainer needs more info)

@soulfroys: Can you start with a the base Drupal install + Filter Perms and then re-enable modules until it breaks and report where the conflict happens?

soulfroys’s picture

For sure! Thank you!

kiwad’s picture

Just had the same bug.

Will first recover from it then will give try to find what went wrong

jaarong’s picture

Just had this happen to me as well. Been using the module for over a year, so I am thinking it is a recent Drupal core change that has affected this.

cyu’s picture

@subnet_rx: oh crud, that wouldn't be good. What version are you running? I'm running 6.22 without issue.

cyu’s picture

With 3 people reporting that this module basically ruins a site's permissions configuration, I'm quite concerned, but I'm also unable to replicate the issue to debug it. Can someone give me instructions on how I can see this bug in action?

jaarong’s picture

I simply filtered for one role, and all modules. Then unchecked one permission and hit save. All permissions for roles that I had not filtered for were removed. The filtered role's permissions stayed intact.

cyu’s picture

@subnet_rx: What I'm looking for is a drupal core version, modules, and theme that I can install along with filter_perms in order to see this behavior. Or even if this is installed on a test site that I could have admin access to I might be able to glean something. Perhaps even browser comes into play.

With over 3,500 users I believe most scenarios lead to the module correctly working. If I can pin down what is unique to the 3 users reporting that the module doesn't work at all and also unsets all permissions, then I can begin to debug.

cyu’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Can't reproduce and can't get instructions to reproduce, so marking closed.

jaarong’s picture

I apologize for not responding, didn't see the reply. I haven't had this problem again, but I basically don't use the filters anymore. I am on D6 with lots of modules installed, so tracking down what specifically is happening in my case might be fairly tough. If it's really only 3 people that have this problem, then it may be something very custom to our set up and not worth the time. Personally, I don't change our permission set up that much, so it hasn't been a huge problem for me.

adamdicarlo’s picture

Status: Closed (cannot reproduce) » Active

Saw this happen on a D6 site with about 340 enabled entries in the system table and 22 roles. The site lost all permissions after submitting the filter_perms form with (I think) most or all roles and permissions filtered in.

$ drush php-eval "\$perms = module_invoke_all('perm'); echo count(\$perms) . PHP_EOL;"
2263

My guess is this happens when there are a lot of permissions and a lot of roles in the actual permissions form that you submit. So to recreate it, I'd try adding a loop into a hook_perm() to add 2200+ permissions, create a bunch of roles... filter to all roles and all permissions and give it a go. If the problem is really just with this module that should do the trick.

cyu’s picture

I believe this is related to http://2bits.com/drupal/drupal-not-saving-admin-pages-large-number-input... which makes it sound like with or without this module you'd not get the form to save but at least with this module you could trim the form down to a small enough amount of inputs so that it would possibly save.

cyu’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)
soulfroys’s picture

I still love this module!

:-)

nattyweb’s picture

Thanks for #18 cYu - that solved my problem.

I had discovered that a whole pile (dozens) of permissions had been lost and the cause was a huge number of permissions (many roles, many permissions) leading to the php max_input_vars limit being exceeded, as showin in my error.log:

[Mon Sep 28 20:31:46 2015] [error] [client 82.43.255.8] PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0, referer: http://xxxxx.org/admin/people/permissions

Now fixed and I can go about manually restoring the lost permissions.