I think the title is well chosen...!
Exactly, I put an entry "Home" that links to "<front>" in the primary links. When I click on it, it goes to home, but the primary link "Home" isn't active (no ' class="active" ' in the anchor). Is this really a bug, or am I wrong?

CommentFileSizeAuthor
#4 patch_couture_cvshead1.6 KBsteph

Comments

gateone’s picture

Just a description: this has happened already in beta5 (and before?)

Stefan Nagtegaal’s picture

Component: other » menu system

I can duplicate using latest HEAD, so this is still an issue...

m3avrck’s picture

Indeed this is an issue. I was looking into this last night but can't figure out exactly the root of the problem. It seems to me that l() is the culprit when it compares the $paths for adding 'active'.

steph’s picture

Status: Active » Needs review
StatusFileSize
new1.6 KB

Although only the change i put on l() function was needed to solve this bug, I modified common.inc and menu.inc to take care of thing.

The path seems not to be manage adequately in a couple of places.

I submitting this patch. Maybe more work is needed but it solves the symptom and point out to the problem.

rkerr’s picture

Adding the magic value of seems akward, but it does do the trick. Maybe it's no less magic than having q = '' indicate the front page :)

I don't like the x = y = z; one-liner, but that could just be personal preference.

Current patch doesn't seem to apply..
"can't find file to patch at input line 9"

m3avrck’s picture

Status: Needs review » Needs work

I don't think this patch will fly. l() is used too often in core, this could be too much of a performance impact.

I had a similar patch to fix l() because it wasn't taking into account query's in the url: http://drupal.org/node/41595

Seems both of these issues needed to be merged into one unified patch to fix both <front> and query page comparisions.

steph’s picture

Status: Needs work » Closed (duplicate)

i submitted a patch there: http://drupal.org/node/41595

We can follow this bug on one thread. So status changed to duplicate.