Hi there,
Since upgrading to 1.7 I noticed the tabs had been removed for our various search pages, on investigation it appears to have been removed by this snippet in apachesolr_search.module:
// Tests whether apachesolr_search is the only enabled search module (in
// which case there are no tabs).
$active_module_info = search_get_info();
$no_tabs = (sizeof($active_module_info) == 1 && isset($active_module_info['apachesolr_search']));
We only have the one enabled search module, but we do have multiple apache solr search pages for various areas of our site, previously these would appear as tabs which was our desired behaviour.
Is it correct for the new version to assume no tabs should be rendered if only apache solr search is enabled?
Regards
Comments
Comment #1
cristiroma commentedI've just hit the same issue and from the commit http://cgit.drupalcode.org/apachesolr/commit/?id=ace43a0 I don't exactly understand which problem tries to solve @ line 181. I am rolling it back and uploading a patch for this.
Comment #2
stefan.r commentedThat is indeed what we were assuming :)
There may be a case where there have to be tabs, but that should be an extra test instead of just taking out the code.
Comment #3
paulbeaneyHi,
I ran into the same problem, but I propose a slightly different way of getting round it: if Solr is the only search module, but there is more than one search page configured, revert to tabs, otherwise stay tabless.
Regards,
- Paul
Comment #4
teknocat commented+1 on paulbeaney's suggestion.
I have a site where the tabs were the only way to navigate between all the different search pages on the site. Only two of them were actually accessible elsewhere, so I need to have tabs for this to be usable in my case. paulbeaney's patch makes the most sense to me.
Comment #5
teknocat commentedHaving applied paulbeany's patch with success, I'm finding another problem, but I don't see how it's actually related to this module. Even though I can confirm that the tabs are having their titles set correctly, by using watchdog to log the menu items after they've been altered, reviewing the menu cache and seeing them there correctly, they all just have a generic title of "Search results" until you actually submit a search. I cannot for the life of me understand this. I don't see at what point they are being reverted to this. It makes no sense. See attached screenshot for example (or just visit http://nwtarts.com/search/artists for example).
This was also never a problem before the version 1.7 update. Does anyone else see this happening on their site?
Comment #6
teknocat commentedI have determined exactly where the second issue with the tabs are that I just commented on. I will submit a new support ticket (if there isn't one already) for that issue as it's not the same as this one. It's the title callback function that's the problem.
Comment #7
ecarty commentedWhat work is required on this? paulbeaney's patch (#3) worked for me too.
Comment #8
stefan.r commentedThe patch needs to be reviewed to see whether the concern in #1314664: Search pages custom pages title setting does nothing is addressed, if not it may need rework
Comment #9
joshua.boltz commentedThe patch for #3 fixes the issue where the tabs were not displaying for each of the Search pages setup in the Solr configuration.
Comment #10
kupide commentedPatch #3 works for me too.
I re-uploaded the patch #3 with a correct name and format.
Comment #11
kupide commentedOups, bad patch uploaded in the previous comment.
Right path here !
Comment #12
oliverpolden commented#11 works for me and agree with the solution.
Comment #13
oliverpolden commentedComment #15
japerryPatch #11 looks good, fixed.