Problem/Motivation

Workbench Moderation adds itself as a dependency multiple time in a feature's .info file when the feature is generated. Note the effect in this sample .info file:

name = Scali Law administration
description = Administration features for this website.
core = 7.x
package = Scali Law
php = 5.2.4
version = 7.x-1.0
project = scalilaw_admin
dependencies[] = ctools
dependencies[] = views
dependencies[] = workbench_moderation
dependencies[] = workbench_moderation
dependencies[] = workbench_moderation
features[ctools][] = views:views_default:3.0
features[features_api][] = api:2
features[views_view][] = manage_files
features[workbench_moderation_states][] = archived
features[workbench_moderation_states][] = draft
features[workbench_moderation_states][] = needs_review
features[workbench_moderation_states][] = published
features[workbench_moderation_transitions][] = archived:draft
features[workbench_moderation_transitions][] = archived:published
features[workbench_moderation_transitions][] = draft:needs_review
features[workbench_moderation_transitions][] = draft:published
features[workbench_moderation_transitions][] = needs_review:draft
features[workbench_moderation_transitions][] = needs_review:published
features[workbench_moderation_transitions][] = published:archived
project path = sites/all/modules/scalilaw

#1314508: Make states/transitions exportable with the Features module

Comments

hefox’s picture

when adding depedency add as [modulename] = [modulename]

That is how features core does it and should prevent any duplicate dependencies

Not sure if features has fixed this bug yet (done an array_unique on dependencies).

danepowell’s picture

Status: Active » Needs review
StatusFileSize
new1.55 KB

I agree, the dependency key should always match the dependent module's name, NOT the component name.

martichka5’s picture

Hello,

I have encountered the same issue. I can confirm this changes resolve the problem.
In our current project we are using Drupal 7.39 and Workbench Moderation 7.x-1.4 versions. So, I attached the patch but made for 7.x-1.4 version of the module.

alansaviolobo’s picture

Status: Needs review » Reviewed & tested by the community

Tested the patch. it works.

das-peter’s picture

Version: 7.x-1.x-dev » 7.x-3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed to the 3.x branch

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.