My code below (in my hook_menu() relationship_menu() )
$items[] = array (
'path' => 'admin/relationship/tidy',
'title' => t('check database'),
'callback' => 'relationship_check_database',
'access' => user_access('administer predicates'),
'type' => MENU_LOCAL_TASK
);
$items[] = array (
'path' => 'admin/relationship/tidy/flush',
'title' => t('flush term cache'),
'callback' => 'relationship_flush_terms',
'access' => user_access('administer predicates'),
'type' => MENU_LOCAL_TASK
);
Does not work. The "flush cache" link should appear as a secondary local task listed underneath the normal "check database" page.
(the callback does trigger when requested by hand)
The link just fails to appear.
When I add a second secondary local task under the tidy/ path "check database"
$items[] = array (
'path' => 'admin/relationship/tidy/all',
'title' => t('list all'),
'callback' => 'relationship_list_all',
'access' => user_access('administer relationships'),
'type' => MENU_LOCAL_TASK,
);
... They BOTH show up.
Of course I have to re-save the modules page to reset the callback paths each time.
I tracked the problem down to menu.inc:
menu_secondary_local_tasks()
<?php
foreach ($local_tasks[$pid]['children'] as $mid) {