Closed (duplicate)
Project:
Content Access
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 May 2016 at 16:27 UTC
Updated:
6 Jul 2026 at 14:22 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
acrosmanUsing the dev version from August 24th, 2016 I'm seeing the same issue. The underlying PHP error is:
I have Content Access enabled, and have setup a single content type to have node specific permissions. Any time I try to save the content type or rebuild permissions the same error is triggered.
Comment #3
acrosmanLooks like the permission rebuild after install is critical to module function. If you do not rebuild the site's permissions before doing anything else the module will fail to detail group IDs correctly and return a blank from
content_access_get_role_gid(). Once that happens the solution appears to be to uninstall the module, reinstall, rebuild permissions, and then re-setup permissions.Comment #4
acrosmanRemoving the config/install yml file prevents the unrecoverable state. Also to avoid conflicts with the main configuration management system the hook_install() needs to check to make sure a configuration sync isn't running. Patch to do both attached.
Comment #6
richienabuk commentedPlease what's the status on this because i intend to use it on a production site.
Thanks
Comment #7
farnoosh commentedCould not apply the patch!
Comment #8
gisleUnassigning to let others work on this.
Patch needs a reroll to apply to HEAD.
Comment #9
gagelafleur commentedAttempting re-roll of #4
Comment #10
martins.bertins commentedI had an exact SQL error and the problem was that content_access settings did not have mappings for all user roles under
content_access_roles_gids.I fixed it by running this drush command
drush ev "require_once drupal_get_path('module', 'content_access').'/content_access.install'; content_access_install();"Comment #11
gisleAll bug fixes go into the most recent branch.
Comment #12
gisleAutomated tests fail. Needs reroll for 2.0.x-dev.
Comment #13
steven jones commentedIf we didn't store role => grantID mapping in config, but in state as per #2960330: role/gid mapping refresh when gid missing (related to configuration synchronisation of content_access.settings and grey listing of roles with config_split) then this wouldn't be an issue, so marking this ticket as a duplicate of that one.