Problem save permissions
-
Good afternoon,
I’m using this plugin on several websites, but I’m experiencing a strange issue on one of them.
The Administrator user role appears to have all permissions correctly assigned, and I can see them checked when viewing the role details.
However, when I switch to another role and try to enable certain permissions, I can check them and save the changes successfully. The permissions still appear checked immediately after saving, but if I leave the page and come back, they are no longer selected and are therefore not actually assigned to the role.
Has anyone experienced the same issue or knows what might be causing it?
Thank you for your help.
Have a great day!
-
Hi @sviluppoatl,
Thanks for reaching out Members Support Team!
This behavior — where capabilities save correctly but disappear after you navigate away — is almost always caused by another plugin on the site that dynamically rebuilds or resets role definitions on page load.
When Members saves capabilities, it writes them to the database and the save is genuinely happening. But if another plugin is calling
add_role()or resetting capabilities for that role on every WordPress init, it overwrites what Members just saved.A few things worth checking:
1. Test with other plugins disabled. Temporarily deactivate all other plugins (except Members) and try saving the capability again, then navigate away and check if it sticks. If it does, a plugin conflict is confirmed.
2. Common culprits. Plugins that register their own custom roles (WooCommerce, LMS plugins, User Role Editor, bbPress, etc.) sometimes re-declare those roles on every page load. If the role you’re editing belongs to one of those plugins, their code may be overwriting your changes.
3. Check the role name. If the role you’re trying to edit was originally created by another plugin, that plugin “owns” it and may regenerate it from scratch each time. In that case, you’d need to configure capabilities through that plugin, or hook into its role registration to add your custom caps.
If deactivating other plugins resolves it, reactivate them one by one to identify the specific conflict. Once you know which plugin is involved, we can help narrow down the next step.
Regards,
Good morning,
I ran a few additional tests without disabling any plugins. I tried saving permissions other than the specific ones I actually need, and those permissions are saved correctly.
Of course, if I disable the plugin for which I need the permissions, those permissions no longer appear in the user role permissions list, which is expected.
The plugin in question is Document Library Pro – Advanced. We previously purchased a license for it, but we have not renewed it. Could this be the reason why the permissions are not being saved correctly? If so, I find this behavior somewhat unexpected.
How would you recommend proceeding with troubleshooting this issue?
Thank you very much for your help!
Have a great day
Never mind, I figured it out.
In the settings of Document Library Pro – Advanced, you need to specify which user roles are allowed to use the plugin. Once I configured the appropriate roles there, the permissions were saved and applied correctly.
Thanks anyway for your support!
Glad to hear that you managed to takle this. Have a great day ahead!
You must be logged in to reply to this topic.