Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When I visit the /search page the page title is "Search", after making a search the page title changes to "Home".
I would think that if this page was returning a result the page title would be something like: "Search results for "my search terms""?
Comment | File | Size | Author |
---|---|---|---|
#11 | 812990-activetrailfix.patch | 5.42 KB | jhodgdon |
#10 | badtitle.png | 52.27 KB | jhodgdon |
#4 | menu.inc_.patch | 532 bytes | rayasa |
Search-Page-Title-Results.png | 8.42 KB | Jeff Burnz | |
Search-Page-Title-Default.png | 5.09 KB | Jeff Burnz |
Comments
Comment #1
jhodgdonWow. This seems like a fairly serious bug... Is this just with Drupal core modules enabled and nothing else?
Comment #2
Jeff Burnz CreditAttribution: Jeff Burnz commentedI have DEVEL enabled and that's it other than core modules.
I should make it clear this is not a feature request for the page-title suggestion I made above - but at least the page title should remain as "Search" and not switch to "Home" which is pretty confusing especially for blind users.
Comment #3
jhodgdonOK. That is definitely a problem if this is happening -- it should definitely not be changing. I'll investigate (unless someone beats me to it).
Comment #4
rayasa CreditAttribution: rayasa commentedhe issue seems to be in the function menu_set_active_trail() in menu.inc.
To fetch the active 'menu_name' (in this case 'navigation') a DB query is made on the 'menu_links' table with a 'link_path' that may or may not exist.
The link_path is being fetched from $item('href') that parses to search/node/<"Your Search Keyword">. A better option would be $item['tab_root'].
The 'menu_name' is required to get the tree data ==> to form the current active breadcrumb and to get the active title.
The patch might fix the problem.
Comment #6
jhodgdonAh. Then this is a side effect of the somewhat screwy but necessary changes that were made to how the menu system is being used for the Search module in another issue, which for some reason I cannot locate at the moment.
Rather than "fixing" how the menu system is working (which isn't the problem), we need to do a drupal_set_title() in the search page callback.
Comment #7
jhodgdonHere's the issue:
#245103: Search page tabs not highlighting
Actually, I'm going to reopen that issue and mark this one as a duplicate, since it is an artifact of the solution that was done there.
Comment #8
moreorless CreditAttribution: moreorless commentedI have also seen the Search page title changing to Home, but in Drupal 6.
Tracked the problem to Chaos Tools Page Manager. Once that was disabled the title changed back from Home to Search.
The problem only seems to have occurred with Chaos Tools 6.x-1.6.
Comment #9
jhodgdonThat was too confusing.
This issue is occurring now in Drupal 7 so I am reopening this issue and marking #245103: Search page tabs not highlighting back to Fixed.
There is a patch on http://drupal.org/files/issues/245103-fixactivetrail.patch that may fix this issue, but it needs testing.
Comment #10
jhodgdonI also think this is "Major", because it's very confusing. See screen shot. We definitely do not want to release D7 with this issue unfixed.
Comment #11
jhodgdonHere's a reroll of the patch that was on that other issue. It fixes the problem, and adds tests to make sure it stays fixed.
And yes, it's ugly. Better solutions would be welcome, especially if they also pass the same test that's in this patch.
Comment #12
pwolanin CreditAttribution: pwolanin commentedIs this really a duplicate of #576290: Breadcrumbs don't work for dynamic paths & local tasks?
Comment #13
jhodgdonYes, it is apparently a duplicate of that other issue. I will add a comment there with this test.
Comment #14
dunx CreditAttribution: dunx commentedComment deleted.