Files in export
1) Can lead to invalid files due to it getting messed up (not sure what leads to that, but have it happened myself and seen instances of it
2) can make for giant features (1 gb movie file? ouch)
3) just not friendly export

Comments

hefox’s picture

Status: Active » Needs work
StatusFileSize
new16.32 KB

Here's a patch that relies on features patch #1064340: Allow export of additional files/assets.

Against release version, need to reroll for -dev

hefox’s picture

StatusFileSize
new10.73 KB
  1. +++ b/drupal/sites/all/modules/contrib/defaultcontent/defaultcontent.features.inc
    @@ -32,6 +32,9 @@ function content_features_export($data, &$export, $module_name) {
    +  $files = &drupal_static('defaultcontent_export_files');
    

    There isn't an easy way to insert a way to return new files to processes here, so just used static instead, which is a bit... meh.

  2. +++ b/drupal/sites/all/modules/contrib/defaultcontent/defaultcontent.features.inc
    @@ -54,7 +63,7 @@ function content_features_rebuild($module_name) {
    +  $components = features_get_default('content', $module_name);
    

    It should be doing this anyhow.

  3. +++ b/drupal/sites/all/modules/contrib/defaultcontent/defaultcontent.module
    @@ -116,77 +116,6 @@ function defaultcontent_permission() {
    - * Implements hook_cron().
    

    I didn't feel like updating this and didn't understand the purpose of it when using features, so removed it and went to using features.

  4. +++ b/drupal/sites/all/modules/contrib/defaultcontent/defaultcontent.module
    @@ -254,7 +183,7 @@ function defaultcontent_get_node($name) {
    +    return clone($temp[$nid]);
    

    This was cuasing bugs as the $node object was being altered twice

comments on patch + new patch with --relative. Oops.

hefox’s picture

Status: Needs work » Needs review
StatusFileSize
new11.27 KB

Patch applies to -dev. Realized that rebuild part was /probably/ to prevent rebuilding when a node is updated, so added a check for that condition.

Status: Needs review » Needs work

The last submitted patch, 3: 2292813-defaultcontent-files-3.patch, failed testing.

hefox’s picture

Status: Needs work » Needs review
StatusFileSize
new11.27 KB

oops