Unless there's some sort of conflict that I am unaware of, I'd say this is a bug.
I've installed Tab Tamer to remove the tabs from all of the pages across the website. It working for everything except for the search pages. You'll see in the attached image that the search pages are the last 3 options, ungrouped. Whenever I change the tabs to hidden, or disabled, and save, they go right back as they were. Even when I try to change the order, nothing happens.
I've tried emptying cache and everything, but it still doesn't change.
Thank you very much.
Comments
Comment #1
mortenson commentedsame here
Comment #2
pvasener commentedGot the same problem and I had a look at the code. There is a bug in the _tabtamer_convert_to_single_array function in the case there is no DEFAULT tab (local task) for a menu. In this case, the $key index is empty instead of having the last_default_path value.
Concerning the 'search' case, there is no default tab because 'search/node' is not default as it's defined with the hook_search hook like any other search type.
So here's a patch which seems to correct the bug but I'm not 100% sure it doesn't have any bad side effects so please test it on your system and review it here.
Comment #3
pvasener commentedComment #4
ezra-g commentedI did the following functional test of this patch:
Before applying:
- at /admin/settings/tabtamer "search" has no fieldset title
- changed 'enabled' to hidden for 'search/%user'
- click save
- form comes back with setting at 'enabled' - setting not changed
applied patch
- still no search fieldset name
- change search user to hidden
- save settings
- Now search fieldset has title "Search" with setting still set to enabled
- set to hidden again
- search/user now set to hidden and the tab is hidden as expected.
I believe the menu cache was cleared after the initial form submission after applying the patch. This seems RTBC.
Attached is a rerolled minor tweak that changes the
$val['type'] == ''check to use empty in case this value is NULL and fixes the spacing of the closing parens per the Drupal coding standards.I tested this patch with successful results in the same manner as above. Marking RTBC.
Comment #5
charos commentedWorks here! Maybe commit this patch to CVS?
Comment #6
mattcasey commentedthanks everyone the patch works for me :D
Comment #7
jwilde commentedthis patch does not work with og panels. Since og panels requires a Home tab, hiding it on the og panel removes the edit tab on all pages.
Jim
Comment #8
CccXxx commentedThis patch also worked for me thanks.
Comment #9
coreyp_1 commentedThanks for tracking this down!
Comment #11
awasson commentedI just noticed that this patch hasn't made it into the current release of Tab Tamer. The patch works extremely well but I wonder if perhaps this issue should remain an open issue until it is resolved in the release version?
Comment #12
Hanscraft commentedThis worked beautifully! Thank you!
Comment #13
guntherdevisch commentedGreat! Thanks, hopefully commited in the next version.
Greets,
Gunther
Comment #14
coreyp_1 commentedI'm very, very sorry for the huge delay here... don't know how I overlooked this. It's been sitting in CVS for a long time now. I'm pushing a new version (1.1) which includes this patch as well as a few other fixes and enhancements. Thanks again for the work!