I noticed that exported nodes are missing the initial indentation, e.g.:

function myfeature_content_defaults() {
$content = array();
$content['about'] = (object)array(
  'exported_path' => 'about',
  'link' => array(
    'menu_name' => 'main-menu',
    'link_path' => 'node-name/about',
    'router_path' => 'node/%',
    'link_title' => 'About',
    'options' => array(),
    'module' => 'menu',
    'hidden' => '0',
    'external' => '0',
    'has_children' => '0',
    'expanded' => '0',
    'weight' => '-6',
    'identifier' => 'main-menu:node-name/about',
  ),
  'title' => 'About',
  'status' => '1',
  'promote' => '0',
  'sticky' => '0',
  'type' => 'category',
  'language' => 'und',
  'created' => '1304655430',
  'comment' => '1',
  'translate' => '0',
  'machine_name' => 'about',
);
return $content;
}

This should instead be:

function myfeature_content_defaults() {
  $content = array();
  $content['about'] = (object)array(
    'exported_path' => 'about',
    'link' => array(
      'menu_name' => 'main-menu',
      'link_path' => 'node-name/about',
      'router_path' => 'node/%',
      'link_title' => 'About',
      'options' => array(),
      'module' => 'menu',
      'hidden' => '0',
      'external' => '0',
      'has_children' => '0',
      'expanded' => '0',
      'weight' => '-6',
      'identifier' => 'main-menu:node-name/about',
    ),
    'title' => 'About',
    'status' => '1',
    'promote' => '0',
    'sticky' => '0',
    'type' => 'category',
    'language' => 'und',
    'created' => '1304655430',
    'comment' => '1',
    'translate' => '0',
    'machine_name' => 'about',
  );
  return $content;
}
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DamienMcKenna’s picture

Status: Active » Needs review
FileSize
1.24 KB

A quick patch to improve the indentation.

This work sponsored by Bluespark Labs.

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community

Tested the patch and it works. I think this can be committed.

rvilar’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
1.4 KB

Accordingly to Drupal coding standards, you have to leave an space between the concatenation operator.

pcho’s picture

Assigned: Unassigned » pcho
Status: Needs review » Fixed

@DamienMcKenna, rvilar

Thank you for your contributions. After reviewing the changes, I applied your patch to the repo for next release. I will declare this issue as fixed.

Status: Fixed » Closed (fixed)

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