Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi
no local tasks would show on our pages.
theme.inc of PE:
function template_preprocess_pane_messages(&$vars) {
$vars['tabs'] = theme('menu_local_tasks');
$vars['action_links'] = menu_local_actions();
$vars['help'] = theme('help');
}
from template_preprocess_page() I'd say it should be:
function template_preprocess_pane_messages(&$vars) {
$vars['tabs'] = menu_local_tabs();
$vars['action_links'] = menu_local_actions();
$vars['help'] = theme('help');
}
http://api.drupal.org/api/drupal/includes--menu.inc/function/menu_local_...
This will add all data needed for print render($tabs);
in pane-messages.tpl.php
I don't know if ctools does something with the local tasks as it did in D6.
Comment | File | Size | Author |
---|---|---|---|
PE_local_tasks.patch | 416 bytes | Kars-T | |
Comments
Comment #1
Kars-T CreditAttribution: Kars-T commentedComment #2
elly CreditAttribution: elly commentedThis is happening to me, too. I am about to try this patch.
Comment #3
elly CreditAttribution: elly commentedThis patch wouldn't apply against the dev version, but I manually applied it and the change does cause local tasks to render, which is great.
Comment #4
Kars-T CreditAttribution: Kars-T commentedStrange the patch is against the lastest dev.
Comment #5
drupalexio CreditAttribution: drupalexio commentedWe are using this in our current project and it works.
Comment #6
pontus_nilssonI can also confirm that local tasks are not rendered.
To reproduce
0. Enable the PE provided site template (or any site template with Page messages pane)
1. Create a node
2. Create a page with the path node/%node/foo
3. Set the menu tab to Foo
The tabs are not rendered.
Apply the patch with this command: patch -p1 < PE_local_tasks.patch
After patching, tabs are rendered.
Comment #7
Letharion CreditAttribution: Letharion commentedPushed. Thanks.
Comment #9
jwilson3I believe this change is causing issues on pages that don't actually have any local tasks because menu_local_tabs() creates a renderable array that is never empty when tested in the template file, see #967690-6: pane_messages is always outputted to html even when empty for details.