Drupal 7's menus support the ability to include in page anchors and append query strings to menu links. This module strips them out in theme_superfish_build(), by not including them in the $link_options array before passing it to l().

The link_options array structure should look something like this when it is passed into l() :

array(
	'attributes'	=> array( [array contents] ),
	'fragment'	=> array( [array contents] ),
	'query'		=> array( [array contents] ),
);

I'm going to do my best to write a patch for this in the next few days if I can find the time to do it.

CommentFileSizeAuthor
#2 1167776-fix-link-with-query-2.patch2.9 KBamitaibu

Comments

mnlund’s picture

That's true! I thought it was the menu system that stripped it out, and didn't realize this is a feature in D7. Fantastic! If you change line 1005 to $link_options += $menu_item['link']['localized_options'] the attributes, query and fragment will be merged into the $link_options.

amitaibu’s picture

Version: 7.x-1.8 » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new2.9 KB

Here's the patch based on #1, which works.

baby.hack’s picture

Thank you so much. My page anchors were working fine before Superfish. I came straight to this tread and applied patch from #2. Problem solved!

jm.federico’s picture

Priority: Normal » Major
Status: Needs review » Reviewed & tested by the community

Scaling to major!
A site with broken links is the same as no site!

Patch works

mehrpadin’s picture

Status: Reviewed & tested by the community » Fixed

Hey everybody,

Patch applied as of v1.9-beta3, thank you all :)

Status: Fixed » Closed (fixed)

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