Download & Extend

Secondary links don't work for <front>

Project:Drupal core
Version:5.x-dev
Component:menu system
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I hope I am not duplicating an existing issue (searching has revealed none) so appologies if I am.

If Secondary links are set up to come from the same menu as primary links then the sub-menu/secondary links are not displayed in the case that the primary link path is <front>.

I have tried this in 4.7 and both the 5.x betas with the same results so it seems to have been a bug for a while.

There have been various discussions on the subject (such as http://drupal.org/node/70146) but as far as I can tell no fix has been attempted.

To my mind this problem seriously hampers the usefulness of the dynamic secondary link functionality so hopefully it can be fixed for 5.x.

Comments

#1

Version:5.0-beta2» 5.1

This bug is still present in the most recent 5.1 release.

#2

Version:5.1» 5.7
Status:active» reviewed & tested by the community

Hello

I've fixed this bug and attached the patch.

(it's my first patch for Drupal, I've tried hard to do it right way ;)

AttachmentSizeStatusTest resultOperations
_menu_get_active_trail_in_submenu.patch552 bytesIgnored: Check issue status.NoneNone

#3

Version:5.7» 5.x-dev
Status:reviewed & tested by the community» needs review

Nice work! Looks like you've definitely found the source of the bug and fixed it.

A couple things to note:

1. I'm attaching a slightly revised version of your patch with code style changes (see http://drupal.org/node/318) and also using drupal_is_front_page(), which I think is the best way to check if we're currently on the front page of the site.

2. Usually when you submit a patch you should set it to "code needs review". Then if someone else comes along and tests it, they can set it to "ready to be committed". For example, if you test the patch I'm submitting here, you can set it to "ready to be committed".

Nice job, though, and welcome to the community of people who have submitted patches ;)

AttachmentSizeStatusTest resultOperations
secondary_links_front.patch770 bytesIgnored: Check issue status.NoneNone

#4

By the way, I tested Drupal 6 and with the new menu system this bug no longer seems to be present. So it really is ready to fix in 5.x only now.

#5

Status:needs review» reviewed & tested by the community

Nice patch thanks, tested with drupal 5.7 and works as expected

#6

Status:reviewed & tested by the community» fixed

Committed to 5.x.

#7

Status:fixed» closed (fixed)

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

nobody click here