Perhaps this is a stupid question, but I can't seem to find the answer. How does one hide the content tab on the search results page? I have "hide core search" enabled.

Comments

cpliakas’s picture

Hi tcoker.

Not a stupid question. I would try clearing the cache to see if that works. Search Lucene API is supposed to clear the cache for you when you select that option, but for one reason or another it may not have. Specifically you will want to clear the menu cache. Let me know if it doesn't work.

Thanks,
Chris

CardinalFang’s picture

Thanks for your suggestion. Clearing the caches didn't work for me.

cpliakas’s picture

Hmm. Tricky one. I cannot seem to replicate the issue on a development site or a production site that Search Lucene API 6.x-2.0-beta5 is installed on. Behind the scenes, Search Lucene API makes use of hook_menu_alter() to hide the search tab and redirect all search queries from search/node/ to search/luceneapi_node/. It is possible that another custom module or contributed module has a conflicting hook_menu_alter()?

CardinalFang’s picture

I'm not using any custom modules, but I do have a number of contributed ones installed. I'm still fairly new to Drupal (only been at it since August) so I have no idea whether a contributed module is conflicting. I'm going to try 6.x-2.0-rc1 and see how that works out.

cpliakas’s picture

Welcome to Drupal :-). It took me 4 months to actually start liking Drupal, so I hope you have reached that point as well. Sometimes a good debugging tool is to disable half the modules and see if the problem persists. If so, disable the other half. Then you can narrow down where the conflict is. Please share your findings, because if it is a problem with Search Lucene API I want to fix it. If anyone else is seeing this problem, please post!

Thanks,
Chris

CardinalFang’s picture

The problem seems to go away after disabling and re-enabling ctools.

cpliakas’s picture

Great job tracking that down, and I greatly appreciate you posting your findings. You have peeked my curiosity, and I am going to look into ctools to see what could have caused the conflict.

Thanks again,
Chris

CardinalFang’s picture

Upon further investigation, the issue seems to be related specifically to the ctools Page Manager.

EWB’s picture

I would like to note that I am experiencing the same issue -- but am not able to resolve it by disabling and re-enabling ctools. It does work when ctools is disabled (Page Manager specifically) but the content tab returns once it is re-enabled. This is using Search Lucene API 6.x-2.0-rc1 and CTools 6.x-1.2

cpliakas’s picture

Title: Hiding the content tab » The Page Manager module in the Ctools suite prevents the Content tab from being hidden
Version: 6.x-2.0-beta5 » 6.x-2.0-rc1
Component: Miscellaneous » Code
Category: support » bug
Status: Active » Needs review
Issue tags: +6.x-2.0-rc2
StatusFileSize
new1.06 KB

I see what is going on. The page_manager_search_menu_alter() function in ctools/page_manager/plugin/tasks/search.inc is conflicting with the hook_menu_alter() implementation in Search Lucene API that hides the content tab. The attached patch fixes the problem, but eliminates the "Redirection status code:" options that redirects calls to search/node to search/luceneapi_node. I have half a mind to eliminate this setting anyways as it is probably best done on the .htaccess layer. What do you guys think? After applying the patch, the menu cache will have to be cleared.

Awesome work narrowing this problem down,
Chris

cpliakas’s picture

StatusFileSize
new1.08 KB

This implementation is actually more correct. The one above will throw errors.

Apologies,
Chris

cpliakas’s picture

Status: Needs review » Fixed

Applied in commit #300938.

CardinalFang’s picture

Fixed my problem. Thanks!

cpliakas’s picture

Great! Thanks for the bug report and the confirmation that the fix worked.

Status: Fixed » Closed (fixed)
Issue tags: -6.x-2.0-rc2

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