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?
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | patch_couture_cvshead | 1.6 KB | steph |
Comments
Comment #1
gateone commentedJust a description: this has happened already in beta5 (and before?)
Comment #2
Stefan Nagtegaal commentedI can duplicate using latest HEAD, so this is still an issue...
Comment #3
m3avrck commentedIndeed 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'.
Comment #4
steph commentedAlthough 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.
Comment #5
rkerr commentedAdding 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"
Comment #6
m3avrck commentedI 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.
Comment #7
steph commentedi submitted a patch there: http://drupal.org/node/41595
We can follow this bug on one thread. So status changed to duplicate.