Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now
23

Sure, Install the features module and then you go to structure -> features Click on "create new feature" Give it a name and then on Edit component you can select what you want to export. Select Content-type: node and you will see a list of all your content types, check the content types you want to export,( when you click the checkbox, you will see the ...


22

With drush you can probably do drush config-delete module_name.settings to delete the configurations that complain


20

Here are a few thoughts though on resetting your features programmatically or as add-on install scripts. You could use Drush to reset the Feature: drush features-revert [feature name] Another thought would be to use features_revert() during the install process: features_revert(array('module' => array('component'))); The Strongarm module could be ...


20

Welcome to the land of Features Configuration Management, aka FCM! It is not only about Features, and not about Configuration Management (as introduced in Drupal version 8). Instead, it is a special case of Software Configuration Management, aka SCM. Mostly because Features can be considered as a code generator, whereas that generated code needs to be ...


16

There's been an on-going discussion about this topic, but it seems that drush features-export (drush fe) is the accepted solution. To find the components (views, pages, etc.) you want to add to your feature, use drush features-components; this command has a relatively easy-to-use interface that should be familiar to anyone who has created Features through ...


16

A feature or features may not revert for the following reasons as cited by some developers in the issue queue #744450: If your feature includes a view views cache could cause it to remain changed; especially, the migrate module (#1) Other features can cause your feature to be overridden (#10) Adding a line in your info file (#24) There are hooks overriding ...


16

Revert ALL components in feature $feature = features_get_features('my_feature_machine_name'); $components = array_keys($feature->info['features']); features_revert(array('my_feature_machine_name' => $components));


16

Create a third Feature defining the components(*) used by the other two independent Features. In the other two Features, remove the components which are now claimed by the third Feature, and instead, list the third Feature as a dependency. (*) In Features for Drupal 7, however, this functionality isn't yet committed — see http://drupal.org/node/1064472, ...


16

Drush feature-update updates the feature code with overwritten settings. So the function is used to export changes to code. If you want to take those changes to another site, you will have to copy the updated feature to the other site unless they share the same code (and then revert the feature and clear cache (not always needed)). In code it could look ...


15

You can revert a single features module with features_revert_module(). features_revert_module('my_feature');


15

Solution Using a hook_uninstall() in FEATURE_NAME.install file and changing the status of the content type, so the system thinks it is an unlocked, custom content type. I posted this also on d.org. <?php /** * Implements hook_uninstall(). */ function FEATURE_NAME_uninstall() { // List custom content types added by this feature $custom_ctypes = ...


13

You add the css file to the module. Use drupal_add_css to include the css file in the .module, this could be done in hook_init and would look something like this: module_name_init() { if (arg(0) == 'views_path') { drupal_add_css(drupal_get_path('module', 'module_name') . '/path_to.css'); } }


13

You can export much more using Feature together with Strongarm and Features extra. Strongarm gives site builders a way to override the default variable values that Drupal core and contributed modules ship with. It is not an end user tool, but a developer and site builder tool which provides an API and a limited UI. Features extra supports: vocabularies; ...


11

Yes, you can do this with Strongarm. You'll want to add all the variables that are prefixed i18n_, language_, and locale_.


11

This is bypassable by cloning the views you need from the four views that the module provides, disabling the original views, and doing all your work in your clones which are 100% trackable.


11

For me, the solution was to load the delete page manually since there is no "delete" link on the content types page. To do this, you just need to construct the URL yourself by following the same URL structure as the delete page for other content types: admin/structure/types/manage/YOUR_CONTENT_TYPE_MACHINE_NAME/delete This brought up the content type ...


11

You can use the Features Tools Module to disable a features module while leaving the functionality that was provided by the feature in place. Instructions provided by autopoietic here. First BACKUP YOUR DATABASE backup your feature (files) if you would like to use it again. Once installed, go to the 'recreate' page for a feature, uncheck all of ...


10

The correct way to remove Features-created content is via hook_update_N (which should be implemented in the file your_module.install). The main idea with Features is to manage configuration with code. Using hook_update_N is consistent with that, since the field deletion is in code (which can be managed with version control) — whereas the equivalent command ...


10

You can get really fine-grained control over your cron runs with these modules: Elyisa cron Elysia Cron extends Drupal standard cron, allowing a fine grain control over each task and several ways to add custom cron jobs to your site. Ultimate Cron The Ultimate Cron handling for Drupal. Runs cron jobs individually in parallel using configurable ...


9

This is a double edged sword, it's like this to prevent data deletion which is always a good thing. There's nothing really to solve, this is expected behaviour. It's the same workflow we use and have been doing for over a year and it works really well. I'd say it's correct but that's a very subjective answer.


9

Make sure the panel was not already added to another feature-module. You need to add the pagemanager stuff (handlers and pages) to the feature too. BTW the pagemanager status enabled/disabled is set via a drupal variable, so check also strongarm: If i.E. node/%node is enabled, then the variable page_manager_node_view_disabled is set to FALSE.


9

features_exclude is generated by the Features UI when creating a Feature. It is not created by drush fu FEATURE_NAME. See https://www.drupal.org/node/1064472#comment-7196064. The features_exclude lines are purely for the new UI to determine if an auto-detected dependency should be checked or if you have specifically unchecked it.


8

Features takes configuration from the database, and stores it as code. When a feature is "Overridden", this means there's a difference between what is stored in the database, and what is stored in the files. This can happen because you've made changes directly to, for example, the Views that are exported. However, it can happen for less obvious reasons. ...


8

For a single View, there is no difference in functionality really. The view will be the same regardless. I use Features anyway because it's makes it more conventient to organize multiple pieces of configuration into "features". I'm not aware that ctools offers any easy way of doing "This view with that panel and those three dependencies in one module". That ...


8

Remove the component by deleting the corresponding line in your feature's .info file. Then run: $ drush fu <feature_name> In your case: Open the file /sites/all/<features_folder>/myfeature/myfeature.info. Delete the following line. features[views_view][] = myview2 Save the file. Run $ drush fu myfeature in your site's folder.


8

I assume what you want to know is how to generate a UUID in Drupal 8, because there's really not much else that you can do ;) Entities all have an UUID automatically, so if you store your data as a config or content entity, you just have to define the uuid entity key. To generate a UUID yourself, you need the uuid service: $uuid = \Drupal::service('uuid');...


7

No, it does not. Features do not implement an uninstall hook, and as such don't get a chance to clean up after themselves.


7

Make several little Features, split by conceptual layer. Advantages: Granularity when reviewing Overrides and performing Reverts — so you don't have to revert everything at once. Modularity — even if you don't plan to reuse individual components, breaking things down into discrete modules will help with maintainability. For deploying a single site from ...


7

Use this procedure to rename a Feature module: drush pm-disable old_feature_name drush pm-uninstall old_feature_name rename the Feature module folder rename the .info file rename the .module file rename any hook prefixes drush pm-enable new_feature_name


Only top voted, non community-wiki answers of a minimum length are eligible