The hook_menu_alter function looks like:

/**
 * Implements hook_menu_alter().
 */
function media_library_menu_alter(&$items) {
  // Administrative screens for viewing the media library.
  $items['admin/content/file/library'] = array(
    'title' => 'Media Library',
    'type' => MENU_LOCAL_TASK,
    'access arguments' => array('administer files'),
    'weight' => 20,
  );
  $items['admin/content/file/library'] = array(
    'title' => 'Media Library',. .
    'description' => 'Manage files in the media library.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('file_entity_admin_file'),
    'access arguments' => array('administer files'),
    'type' => MENU_LOCAL_TASK,
    'file' => 'file_entity.admin.inc',
    'file path' => drupal_get_path('module', 'file_entity'),
    'weight' => 20,
  );
}

Am I misunderstanding something, or is the first $items['admin/content/file/library'] = array( . . .) overridden by the second.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Devin Carlson’s picture

Status: Active » Needs review
FileSize
703 bytes

A patch to remove the extraneous code.

Devin Carlson’s picture

Status: Needs review » Fixed

Tested #1 and committed to Media Library 7.x-1.x.

  • Devin Carlson committed 95377b3 on 7.x-1.x
    Issue #2498621 by Devin Carlson: Removed extraneous code from...

Status: Fixed » Closed (fixed)

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