Steps to reproduce.

1. Create a module with some themed page with template inside the module.
2. Create a link inside template (Something like l('Test link', $_GET['q'], array('fragment' = 'bottom'));
3. Browse to that page.

See, that this link has "active" class in HTML code.

4. Copy the template and paste it in your active theme directory.
5. Flush the cache and browse the page again.

Observe that link doesn't have "active" class now.

Expected:
1. Link should have "active" class in both cases.
2. No link with 'fragment' (and 'query' as well) option set should have "active" class.

Comments

Dako’s picture

Title: l function sets 'active' class wrong » l() function sets 'active' class wrong
Dako’s picture

Seems like I was wrong about 4 and 5.

But anyway, link should not have "active" class is 'fragment' or 'query' options were passed.

maijs’s picture

I agree, this is annoying. I'm developing a module that needs to point links to current page with different query strings and now all links have 'active' class attached to them.

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.