Problem/Motivation
varbase_layout_builder_update_90003() uninstalls the Block Content Permissions module. Its docblock says Drupal core now provides the same permissions "using the exact same permission strings", so "uninstalling the contrib module therefore keeps every existing role permission valid".
Only some of the strings are the same. Core's BlockContentPermissions provides create <type> block content, edit any <type> block content and delete any <type> block content. Block Content Permissions provided:
create <type> block content: same name in core.delete any <type> block content: same name in core.update any <type> block content: core calls thisedit any <type> block content.administer block content types: core calls thisadminister block types.view restricted block content("View full list on the Block Content overview page"): core's closest equivalent isaccess block library.
When a module is uninstalled, Drupal removes the permissions it defined from every role. So after this update, any non-admin role that edited block content through Block Content Permissions has no edit permission for block content at all, and the same applies to the two module-level permissions. Nothing is logged; the update reports success.
Two follow-on effects:
- Editors can no longer edit reusable block content (including the Varbase block types such as Rich text, HTML code, Gallery and Media blocks).
- Sites that keep configuration in code still have the old permission names in their exported
user.role.*.yml, so the nextdrush config:importfails because those permissions no longer exist.
Steps to reproduce
- On a site with Varbase Layout Builder before 90003 and Block Content Permissions enabled, give a non-admin role
update any basic block content(and optionallyadminister block content types). - Update Varbase Layout Builder to 10.0.71 and run
drush updb. - Check the role's permissions: it has no
edit any basic block content, and the other permission is gone too. A user with that role can no longer edit Basic blocks.
Proposed resolution
Before uninstalling, grant every non-admin role the core equivalent of each permission whose name differs:
update any <type> block content→edit any <type> block contentadminister block content types→administer block typesview restricted block content→access block library
Then uninstall as today. create and delete any need no change. The attached patch does this inside varbase_layout_builder_update_90003() and corrects the docblock. Sites that already ran 90003 have lost the permissions; they need a manual re-grant (or a follow-up update that cannot recover which roles had them, so a release note is probably the honest option).
Remaining tasks
- ✅ File an issue about this project
- ✅ Addition/Change/Update/Fix to this project
- ✅ Testing to ensure no regression
- ❌ Automated unit/functional testing coverage
- ➖ Developer Documentation support on feature change/addition
- ➖ User Guide Documentation support on feature change/addition
- ➖ UX/UI designer responsibilities
- ➖ Accessibility and Readability
- ✅ Reviewed by a human
- ❌ Code review by maintainers
- ❌ Full testing and approval
- ❌ Credit contributors
- ❌ Review with the product owner
- ✅ Update Release Notes
- ✅ Release varbase_layout_builder-10.0.72
User interface changes
- N/A
API changes
- N/A
Data model changes
- Role configuration: affected roles gain the core-named permissions before Block Content Permissions is uninstalled.
Release notes snippet
- Fixed: updating no longer removes block content edit permissions from roles when Block Content Permissions is uninstalled. Sites that already ran update 90003 should re-grant
edit any <type> block contentto their editorial roles.
This issue summary and the patch were drafted with Claude Code (an AI assistant) and has been reviewed by a human. The issue was discovered by the assistant.
Issue fork varbase_layout_builder-3629284
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mhawwari commentedComment #3
mhawwari commentedComment #4
mhawwari commentedComment #7
mhawwari commentedComment #8
mhawwari commentedComment #10
rajab natshah✅ Released in varbase_layout_builder 10.0.72.