On pages configured to ignore URLs, I was seeing no primary tabs rendered at all. In breaking out the page preprocessing into its own function, the check against the 'URLs to ignore' was being ignored. This resulted in the primary tabs being removed in the page preprocess function for all pages. Checking whether the $tabs variable is empty as a condition for unsetting the primary tabs fixed this issue for me.
At the end of the file contextual_tabs.module, insert an if statement like below.
<?php
function contextual_tabs_preprocess_page(&$variables) {
$tabs = contextual_tabs_render();
if (!empty($tabs)) {
unset($variables['tabs']['#primary']);
}
$variables['primarytabs'] = $tabs;
}
?>I have never created a patch file, so the attached file may or may not apply correctly.
| Comment | File | Size | Author |
|---|---|---|---|
| contextual_tabs-do_not_inore_URLs_to_ignore-2045139-1-7.43.patch | 475 bytes | jlholmes |
Comments
Comment #2
zoursman commentedI got the same problem, your patch is working fine, Thx.
Comment #3
wizonesolutionsUpgrading to Major since this breaks *all* primary tabs unconditionally on all Open Atrium installations.
The patch works!
Comment #4
mpotter commentedWell, it doesn't break all primary tabs in all Open Atrium installations because this didn't show up on any of our existing sites nor on new sites. It only happens on pages set to ignore URLs where there are additional preprocess functions.
But the patch is still reasonable and I'll get it into the next release of Atrium.
Comment #6
mpotter commentedCommitted to 9a5a725.
Comment #7
wizonesolutionsAwesome, thanks!