The D7 site i'm working has a feature that includes two custom product types, amongst other things. A custom feature gets auto-detected and added as a dependency because it contains a rule on one of the product types. Another feature added to the site install profile contains the permissions to those types.

After i exported the features and tried to install the site again, it breaks because:

  • the product types are do not get created, i expect this log entry to show but does not:
    WD features: Rebuilding feature_name / commerce_product_type
    Which, i'm guessing, is when the types get created from the feature. That log entry shows on a successful build (see below).
  • consequently, the permissions feature causes a fatal error when trying to insert the types permissions into the db, since they don't exist and not defined by a module (from commerce_entity_access_permissions).

The solution for the fix is to manually remove the auto-detected feature with the rules.

I assumed that there's something wrong with that feature but can't think of what. Has anyone experienced something like that?

  • You may want to check your PHP memory. For some reason Commerce installs use a lot of it. If you are running out, your PHP log should tell you.
    – keithm
    Nov 4, 2011 at 15:58
  • no such log entry found... would that also show in the drush output by any chance?
    – nymo
    Nov 4, 2011 at 16:03
  • The location of the PHP error log is given by the configuration variable 'error_log'. If you are running phpinfo, it will display the value in the 'core' section.
    – keithm
    Nov 4, 2011 at 19:55
  • cool, that's where i looked.
    – nymo
    Nov 4, 2011 at 21:06
  • I think i found a small bit of what could be the problem. When i manually reordered the feature's dependencies, i got a different error. I moved the commerce_features above the custom one, and the commerce_product_types feature component was recognized. The new error doesn't break the site install. More to come when i figure out a better solution then re-ordering the feature's dependencies.
    – nymo
    Nov 4, 2011 at 21:12

1 Answer 1


It seems to be a problem with Features and how Drush site-install processes. Basically, features_include() is called after each feature is enabled during the site install. Somehow (but most likely due to the ordering of the dependencies), the commerce_features module gets enabled after my custom feature. As such, features_include(), which has already ran and cached its data, skips calling commerce_features_features_api(), which is crucial for my custom product types, included in yet another custom feature, to be created.

I opened an issue at http://drupal.org/node/1334438, see for more details and follow-ups.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.