Hello.

I am developing a module which makes specialised use of a taxonomy vocabulary. I therefore wish to add tabs to the taxonomy/edit/term page, so that additional settings can be made on relevant taxonomy terms.

The menu entry in the taxonomy module is:

  $items['admin/content/taxonomy/edit/term'] = array(
    'title' => 'Edit term',
    'page callback' => 'taxonomy_admin_term_edit',
    'access arguments' => array('administer taxonomy'),
    'type' => MENU_CALLBACK,
    'file' => 'taxonomy.admin.inc',
  );

The code I have written is:

  $items['admin/content/taxonomy/edit/term/%/options'] = 
    array(
      'title' => t('Options'),
      'type' => MENU_DEFAULT_LOCAL_TASK,
      'weight' => -1,
    );

  $items['admin/content/taxonomy/edit/term/%/mlsp_access'] = 
    array(
      'title' => t('MLSP Access'),
      'type' => MENU_LOCAL_TASK,
      'weight' => 1,
      'page callback' => 'drupal_get_form',
      'page arguments' => array('mlsp_access_admin_by_term_form', 5),
      'access callback' => 'user_access',
      'access arguments' => array('administer mlsp_access'),
    );

Now, it all works fine, except that if I view the new page I created (the MLSP access tab) and then click on the other tab ('Options'), the URL loaded is admin/content/taxonomy/edit/term without a term id as the next element of the URL. The core taxonomy edit page thus attempts to load without a tid, and as a result gives error messages. Something I don't understand is happening! What do I need to do to make this work?

Thank you...

Comments

lxdff’s picture

i meet the same problem, who has a solution?

thanks