Array which described plugin 'Existing node' have 2 identical keys:

'title' => t('Node'),
'title' => t('Existing node'),

Patch delete first.

Comments

a.milkovsky’s picture

Status: Needs review » Reviewed & tested by the community

I agree with you. Nice hint.

japerry’s picture

Status: Reviewed & tested by the community » Postponed (maintainer needs more info)

Not quite sure this is the correct approach. I thought that title is supposed to be the default. Where is the 'existing node' key being set?

andrewsizz’s picture

Status: Postponed (maintainer needs more info) » Needs review

Hey Jacob,
Here a full array:

$plugin = array(
  'title' => t('Node'),  // <- first one.
  'single' => TRUE,
  'defaults' => array(
    'nid' => '',
    'links' => TRUE,
    'leave_node_title' => FALSE,
    'identifier' => '',
    'build_mode' => 'teaser',
  ),
  'title' => t('Existing node'), // <- second one.
  'icon' => 'icon_node.png',
  'description' => t('Add a node from your site as content.'),
  'category' => t('Custom'),
  'top level' => TRUE,
  'js' => array('misc/autocomplete.js'),
);
a.milkovsky’s picture

Status: Needs review » Reviewed & tested by the community

Seems there is no reason to have 2 elements with the same key 'title' in the array. Makes sense to remove one of them.
I will reset the status as was before.

japerry’s picture

Status: Reviewed & tested by the community » Fixed

ahh i see the context now. Yup, fixed.

  • japerry committed 2678da8 on 7.x-1.x authored by AndrewsizZ
    Issue #2228083 by AndrewsizZ: Delete not needed element from array in...

Status: Fixed » Closed (fixed)

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