When including permissions into features that are dependent on actions, then rebuilding those features is issuing a warning Warning in features rebuild of !module. No module defines permission "!name".' because the actions list is not rebuilt early enough.

An example: the module role_delegation with the action execute role_delegation_delegate_roles_action

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jurgenhaas’s picture

Title: User oermission features rebuild needs to reset action list » User permission features rebuild needs to reset action list
Status: Active » Needs review
FileSize
538 bytes

Attached a patch that solves the problem.

PascalAnimateur’s picture

The patch doesn't work with exported feeds permissions in the same feature as the corresponding feed importer (see issue #2334419: Features with feed importers having issues with permissions)
:(

hefox’s picture

What other modules are effected by this? This seems like may be something better fixed more specially, instead of rebuilding actions on ever permission rebuild for potentially one contrib module.

jproctor’s picture

I have a feature which encodes permissions supplied by VPPR, one from Google Analytics, and one from Field Permissions. Rebuilding the actions list doesn't help any of them, but this seems like a related issue (as with Feeds in comment #2).

I get the warnings repeatably on my dev environment, when I copy the production db in and disable an unrelated module.

And this is new for me, appearing only after I upgraded from 2.5 to 2.6, so I chased some likely commits that might have done it. Reverting the patch in #2421127 Features should have it's own cache bin makes the problem disappear.

In all of my cases, user_permission_features_rebuild() knows which module is supposed to be providing the permission, but that module doesn't report it, which makes me think there's a mismatch between caches: something's not being cleared or rebuilt in the right order. That generality might also fix these two related issues; is there a way to check the cache for awareness of the dependent modules before rebuilding the features?

hefox’s picture

Title: User permission features rebuild needs to reset action list » role delegation conflict: User permission features rebuild needs to reset action list
Category: Bug report » Feature request
PascalAnimateur’s picture

Version: 7.x-2.x-dev » 7.x-2.7
FileSize
557 bytes

Calling ctools_export_load_object_reset instead of actions_list fixes the problem as far as feeds importers permissions are concerned. Here's a patch against features 7.x-2.7

This needs more testing, and we should make sure we don't break / slow down anything with this approach.

jproctor’s picture

#6 doesn't fix my problem. Glad you got yours figured out, though.

Siggy’s picture

Using the #6 , 2334409-6 patch , solves the issue "Warning in features rebuild of !module. No module defines ..." .
It looks like it was the last permission added on our project (or random).