@delzhand @kerrivader Do y'all know if anyone is maintaining this project? I don't have access to push branches and create MRs on the project repo and we're maintaining three different patches in our codebase that I'd love to get into a new release, or at least into the dev branch.
We're currently using patches from:
- https://www.drupal.org/project/assembly/issues/3350991 π Error while fetching Assembly references Needs review
- https://www.drupal.org/project/assembly/issues/3286110 π Automated Drupal 10 compatibility fixes Needs review
- https://www.drupal.org/project/assembly/issues/3488950 π Query Access Check error in 10.2.11 Active
The project repo doesn't allow me to push a branch for an MR review. I'm uploading a patch here.
audioroger β created an issue.
I had a similar experience when renaming, disabling or deleting a custom permission. Any of these actions leads to an exception when saving the permissions from /admin/people/permissions.
RuntimeException: Adding non-existent permissions to a role is not allowed. The incorrect permissions are "[permission-name]". in Drupal\user\Entity\Role->calculateDependencies() (line 207 of core/modules/user/src/Entity/Role.php).
The workaround I found was to first disable the custom permission for all user roles and save. Then rename, disable or delete the custom permission. In the case that you are renaming, you would then go back to the permissions page and re-enable the permission for the roles you removed it from.
Note: I have no idea how this works with translations.
More explicitly
Steps to reproduce
- Login as an Administrator
- Go to: /admin/people/custom-permissions/list
- Add a permission and save
- Open a new tab and go to: /admin/people/permissions
- Search for the custom permission added in step 3
- Enable it for any role below Administrator and save permissions
- Go back to: /admin/people/custom-permissions/list
- Rename, disable or delete the permission added in step 3 and save
- Go back to: /admin/people/permissions
- With no changes: Scroll down and click "Save permissions"
Behavior
Exception shown above
Expected Behavior
Permissions save without exception
Workaround
- Login as an Administrator
- Go to: /admin/people/custom-permissions/list
- Add a permission and save
- Open a new tab and go to: /admin/people/permissions
- Search for the permission from step 3
- Disable it for ALL ROLES below Administrator and save permissions
- Go back to: /admin/people/custom-permissions/list
- Disable, rename or delete the permission(s) from step 3 and save
- Go back to: /admin/people/permissions
- With no changes: Scroll down and click "Save permissions"
In the case of renaming the permission, re-enable it for all roles in step 9/10
Behavior
Permissions save without exception
Environment
Drupal core: 10.2.8
config_perms: 2.1.0
audioroger β made their first commit to this issueβs fork.
Uploading the patch generated from https://git.drupalcode.org/project/readonlymode/-/merge_requests/4/diffs... based on comment 19.
Don't be mad y'all, I know there are plenty of conversations around uploaded patches vs. using MR generated patches locally. For me, I'm contributing this patch to another project that doesn't have local patches, so I want a permanent link. So far as I can tell this is not yet supported in GitLab.