So I am using the revisioning module and I wanted to override the node_options_$node->type variable for several content types. I included the variables in features and download the tar.gz file. I see additions to features.inc, the .info file, and the new file .strongarm.inc. At admin/settings/strongarm the variables have an overridden status, but I when I go to edit the content type I don't see any of the revisioning check boxes checked. What am I missing?

Comments

bblake’s picture

If you're using the revisioning module ( as opposed to core revision system ), there are a couple other variables you'll need in addition to node_options_type ( revisioning_auto_publish_type, new_revisions_type ) that control the additional checkboxes. Do you also have these in your feature?

claudiu.cristea’s picture

Version: 6.x-2.0 » 7.x-2.x-dev
Category: support » bug

I'm using the standard node revision mechanism. I checked "Publishing options" > "Create new revision" under admin/structure/types/manage/mynodetype. I used Strongarm to add node_options_mynodetype to a feature "myfeature".

Then I enabled the feature directly using an update script (that's for deploying need):

function mymodule_update_7023() {
  module_enable(array('myfeature'));
}

The variable was not changed in the system.

I experienced the same behavior with 'site_name' variable.

bblake’s picture

What you're seeing is the intended behavior. What happens is that you have the variable set in your variables table on your production site. When you enable the new feature, it registers that those variables have been strongarmed, but does not automatically delete the vars from the database and use the strongarmed values. You should be able to go to your feature and manually revert the strongarm section and your new variables will show up.

claudiu.cristea’s picture

That's exactly the thing I want to avoid. I have no access to production. The client knows only to type $ drush updb on the production shell.

I know the I can variable_set() inside a hook_update_N() but I wanted to do this through Features. What else?

bblake’s picture

You've got a couple options:
1) See if the client can also do `drush fr featurename` on the command line.
2) Add this into an update hook:

  module_load_include('inc', 'features', 'features.export');
  features_include();
  variable_features_revert('featurename');

Both of those will revert the variables in the feature for you. Does that work for you?

bblake’s picture

Status: Active » Fixed

Closing. If neither of these options work for you, feel free to re-open.

Status: Fixed » Closed (fixed)

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