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.

CommentFileSizeAuthor
PE_local_tasks.patch416 bytesKars-T
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Kars-T’s picture

Status: Active » Needs review
elly’s picture

This is happening to me, too. I am about to try this patch.

elly’s picture

This 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.

Kars-T’s picture

Strange the patch is against the lastest dev.

drupalexio’s picture

Status: Needs review » Reviewed & tested by the community

We are using this in our current project and it works.

pontus_nilsson’s picture

I 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.

Letharion’s picture

Status: Reviewed & tested by the community » Fixed

Pushed. Thanks.

Status: Fixed » Closed (fixed)

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

jwilson3’s picture

Issue summary: View changes

I 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.