It would be nice if Features auto-detected pathauto settings for selected content types. I understand that there isn't an exportable for this but it seems like a standard use case that would warrant an exception. For now I'm just manually putting a simple variable_set in an .install file. Example: variable_set('pathauto_node_CONTENT-TYPE_pattern', 'news/[yyyy]/[title-raw]');

Comments

yhahn’s picture

Assigned: Unassigned » yhahn
Priority: Normal » Critical

Agreed. This and other node-type related variables are high on my list because they follow predictable patterns.

If you're interested in looking at a way to implement this, we have a module we use for "exporting" / forcibly setting and enforcing variable values:

http://drupal.org/project/strongarm

Adding features integration to this, and then having the node module integration delegate node type-related variables to the strongarm features integration would be a two-step solution to this problem.

a_c_m’s picture

I've run into this as well.

Strong arm, for my needs is a little strong.

I'm happy if the results get changed, but i would like to set some defaults for when the module is installed if the variable doesn't already exist. Would it make sense for the features module to scan the modules settings pages (or perhaps even the variables table direct) and then build a list of the relevant variables for the selected modules.
The feature creator can then mark the variables they want exported (perhaps also mark the variables to be strongarmed), the features module then, like rickvug did, would create an install file to set them.

Once the variables are exported to code, you also also see when the code and DB no longer match.

:EDIT: i just found - http://drupal.org/project/drush_sm which looks like its done a lot of the hard work for us.

clemens.tolboom’s picture

With drush_sm there is a problem with the import of a locale/language variable which is an object. There is a note in the code about that :)

Jackinloadup’s picture

subscribe

scottrigby’s picture

Status: Active » Closed (duplicate)

continue discussion at #551736: Variable export by module ?