Closed (fixed)
Project:
Drupal core
Version:
4.7.x-dev
Component:
menu system
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
11 Aug 2006 at 05:10 UTC
Updated:
25 Dec 2006 at 17:31 UTC
Jump to comment: Most recent file
After installing 2 different 4.7.3 sites, I have noticed that the "home" link in the breadcrumb points to example.com/node. Even drupal.org is experiencing this. The "Home" link no longer points to http://drupal.org. It points to http://drupal.org/node.
This is going to be bad for bookmarking and for search engine rankings.
http://drupal.org/node/77481 has some commentary on this problem as well.
This "bug" is preventing me from rolling out 2 new sites.
Thoughts?
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | menu_home_link_0.patch | 752 bytes | Zen |
| #17 | menu_get_active_breadcrumb.patch | 606 bytes | chx |
| #16 | menu.inc.menu_get_active_breadcrumb_2.patch | 955 bytes | harry slaughter |
| #13 | menu.inc.menu_get_active_breadcrumb_1.patch | 942 bytes | harry slaughter |
| #7 | menu.inc.menu_get_active_breadcrumb_0.patch | 917 bytes | harry slaughter |
Comments
Comment #1
andre75 commentedDefenitely should be investigated. I decided to revert back to an older version because of this "bug".
Comment #2
scroogie commentedIs this perhaps related to: http://drupal.org/node/59222 ?
Comment #3
harry slaughteri suspect the problem is in menu.inc -> menu_get_active_breadcrumb()
in the supposedly working 4.6.9 code, the home link is set as follows:
in the current 4.7.3 line 533 code, it is set as follows
I would imagine the fix is to change it back.
Comment #4
harry slaughterbumping priority on this as it's a very important bug to those who are concerned with losing google page rank due to having duplicate pages.
Comment #5
venkat-rk commentedpatch works great for me on a 4.7.3 site that had this problem.
Many thanks:-)
Comment #6
harry slaughterOK, bit of background info in order.
Pretty much from the beginning of recorded history
Dec-27-2005 - Issue 36465
Aug-7-2006 - Issue 72352
Which brings us to today and this current issue. Just wanted to record the history of this line of code.
Comment #7
harry slaughterOK, from what I can tell, Issue 72352 is a 'hack' to make the i18n module work as desired. I believe the correct fix for that issue is to fix i18n (or whatever module it is that depends on including country codes in urls [ie: example.com/en/]).
I reccomend undoing the 72352 patch and adding some comments to discourage folks from messing with it.
Comment #8
venkat-rk commentedDoes this mean that if one doesn't currently use or is never going to use the i18n module, the fix in comment #3 will do? Or should the latest patch be applied irrespective of this?
Comment #9
harry slaughterthe second patch contains what i believe to be the correct one.
and if you never use the i18n module, you won't run into the problems that issue 72352 'fixed'.
i'd run with the 2nd patch for now and check this thread before upgrading to the next release of drupal to verify that the /node link problem is fixed.
Comment #10
ericatkins commentedThanks! Patch working great for me on all 4.7.3 sites.
On a 4.7.2 site in admin/menu I enabled then disabled "content". This fixed the problem on the 4.7.2 site.
Comment #11
venkat-rk commented@Harry: Many thanks for that clarification.
Comment #12
dries commentedPlease don't link to discussions on drupal.org from the code comments. Summarize the discussion in 1 or 2 paragraphs and include that in the comments. Thanks.
Comment #13
harry slaughtersummary added, links removed
Comment #14
beginner commentedComment #15
drumm<front>is meant to be for UI only since an empty string would be the way to specify the front page, but that is not visible in something like a list of paths. For code, a simple empty string is correct.Comment #16
harry slaughteryeah, wasn't sure why link was changed from '' to '' in http://drupal.org/node/36465 . assummed it was for a reason.
Comment #17
chx commentedWe just can't change the front page URL in a minor release.
Now, a major release is a totally different issue. I removed the second, empty hunk which failed anyways and I deem this RTBC.
Comment #18
drummI removed 'Google' from the comment since that is trademarked, etc. Perhaps the documentation for this choice should be in the function documentation for url().
Committed to HEAD.
Comment #19
harry slaughteri'm no trademark lawyer, but i believe trademarks are for protecting references to other products that are NOT the trademarked item. (ie i couldn't create a search engine called Harry's Google). But I don't think it's illegal to use a trademark when referring to the object to which the trademark legally applies.
plus, i think pagerank is (TM) too.
point of the elaborate comment is that hopefully nobody will re-break this section of code to fix a bug in *another* module. people are very picky about this pagerank business.
Comment #20
(not verified) commentedComment #21
Zen commentedbackport for the 4-7 branch.
Comment #22
drummThen label it as 4.7.
Comment #23
chx commentedWe just can't change the front page URL in a minor release.
Comment #24
TheWhippinpost commentedI think this is short-sighted - It concerns me that very few results show-up in a search for this issue, particularly when breadcrumbs are a common feature, and this issue has never been rolled-out. I can only surmise that there are a great many sites unknowingly suffering as a result.
Comment #25
plumbley commentedI have a completely different front page module at "?q=front", and it took me ages to work out why it sometimes appeared at www.example.com/ and sometimes at www.example.com/front, which I really didn't want.
As far as I can see, there is no need for /node (or /front for me) ever to appear *externally*, for the benefit of any Drupal module. Here's my reasoning:
As soon as _drupal_bootstrap() gets to DRUPAL_BOOTSTRAP_PATH phase, "prior to loading modules and invoking hook_init()", it calls drupal_init_path() (in path.inc) which, if
$_GET['q']is empty, doesSo before any module gets to see it, the path has already been set to ?q=node (or ?q=front in my case). Therefore no module ever sees a blank path, and there's no way that I can see that the current patch can break anything.
If this is right,
www.example.com/frontor /node or whatever should only ever be visible internally, never externally to refer to the home page. Of course /front or /node is still there, if you really want to link to them, and they will still behave as the front page because drupal_is_front_page() does that.Best wishes, Mark.
Comment #26
RobRoy commentedReally the larger issue is here or one of the issues mentioned in THAT issue: http://drupal.org/node/65493
url() should return / when $path == frontpage
Comment #27
Zen commentedI disagree with
The frontpage/home URL is "/" in 4.7.x. If it isn't, it's a bug.
-K
Comment #28
killes@www.drop.org commentedapplied
Comment #29
(not verified) commented