Links containing anchors (#anchor)

Finy's picture
Finy
Tue, 12/16/2014 - 17:35
#1
Links containing anchors (#anchor)

Whenever I try to create a link using a URL that contains an anchor (#), MegaMenu seems to be converting the # into %23. This only happens when using a relative URL (e.g. /foo/bar#anchor). If I use a full URL (http://mysite.com/foo/bar#anchor) the # does not get converted. However, I'm developing on a staging server that does not use the same domain as the production server and I have many many links that will contain anchors.

I'm running MD MegaMenu 7.x-1.15 on Drupal Core 7.31.

Help please?

cindy's picture
cindy
Sun, 01/04/2015 - 22:53

Hi,
We release version 7.x-1.16
Please download

jai.patil's picture
jai.patil
Wed, 02/11/2015 - 12:46

Hi , I ve downloaded the latest version i.e 7.x-1.16 , yet the links with # dont seem to be working . 

cindy's picture
cindy
Wed, 02/11/2015 - 22:57

Hi, Could you please send us your site's url and admin account to [email protected] (also this forum link/)

holger's picture
holger
Mon, 04/13/2015 - 08:19

Hello, same problem, is there a solution for internal links?

cindy's picture
cindy
Wed, 04/15/2015 - 04:33

Hi,

Please update the latest version 7.x-1.17

holger's picture
holger
Wed, 05/06/2015 - 07:06

Hello Cindy,
i updated the Megamenu to Version 1.17, unfortunately the new Version doesn't work.
It still links to %23 Url

cindy's picture
cindy
Thu, 05/07/2015 - 22:37

Hi Holger

Please check your email

We send you the latest updated version

ansberete's picture
ansberete
Thu, 05/14/2015 - 16:03

Hi can you please send me the latest version?

Thx

cindy's picture
cindy
Thu, 05/14/2015 - 22:16

Sure,

Please check your email Ansberete 

jtk's picture
jtk
Wed, 06/24/2015 - 08:45

I just opened a new topic with this exact issue, I am running .17 Drupal 7.38.

I will close the other entry if I can get resolution through this topic.

Thank you,

/jtk

phuonght's picture
phuonght
Wed, 06/24/2015 - 22:45

Hi,

Check your email please. We just you an update.

hmartens's picture
hmartens
Mon, 06/29/2015 - 05:44

Good day

I'm having a similar issue. I'm using facets and so I need to link straight to the specific page with the specific tags which is: 

/linktopage?f[0]=solution-type:80&f[1]=product-category:96

Thanks.

phuonght's picture
phuonght
Mon, 06/29/2015 - 05:59

Hmartens,

Check your email please. We just sent you the update :)

hmartens's picture
hmartens
Mon, 06/29/2015 - 06:23

Thank you I received it but when I copy it to my site and I clear cache I get a lot of errors: Notice: Undefined property: stdClass::$fragment in include() (line 17 of /usr/www/users/ariapzqfbr/sites/all/modules/md_megamenu/templates/menu/md_megamenu_essential_item.tpl.php).

jtk's picture
jtk
Mon, 06/29/2015 - 09:38

Thank you for the update but I am receiving the same exact error as Hmartens after applying update. (Undefined property: stdClass::$fragment in include() (line 17).

Any ideas?

/jtk

jtk's picture
jtk
Mon, 06/29/2015 - 10:07

Although, Menu target links are reflecting correctly now in browser. I just need to get rid of the $fragment error now.

Thank you,

/jtk

jtk's picture
jtk
Mon, 06/29/2015 - 12:26

Upon further review, other argument characters are not coming through correctly such as ? and = signs. I created the menu from scratch and I have reduced the fragment error from "hundreds" to "one" php error. Not sure if this info helps in troubleshooting.

Thank you,

/jtk

jtk's picture
jtk
Mon, 06/29/2015 - 15:38

More Information,

Looking at the code it seems that if the link doesn't have a hashtag, it errors. To avoid error, add a hash at end of link regardless of whether it needs it or not.

Also, (sorry to write a book on this), but if you add the link as a [html] menu block instead of a [link] block, you can add any characters, arguments or parameters that you want to add without translation. A different easy way around this issue.

/jtk 

phuonght's picture
phuonght
Mon, 06/29/2015 - 23:23

Hmartens and Jtk,

Please check your email. We had a small fix and just sent you new file.

hmartens's picture
hmartens
Tue, 06/30/2015 - 02:01

Good morning. Thanks for the update but it still doesn't work. It doesn't give me any errors anymore but it still changes special characters. It changes my facet link from: /category/pabxswitchboards?f[0]=solution-type:80&f[1]=product-category:95

to this: /category/pabxswitchboards%3Ff%5B0%5D%3Dsolution-type%3A80%26f%5B1%5D%3Dproduct-category%3A95

Thank you.

phuonght's picture
phuonght
Tue, 06/30/2015 - 04:51

Hmartens,

Please check your email again :)

hmartens's picture
hmartens
Tue, 06/30/2015 - 05:21

Thanks the update fixed the link issue BUT it introduced a huge amount of the following errors: otice: Undefined index: query in theme_megamenu_col_content() (line 300 of /usr/www/users/ariapzqfbr/sites/all/modules/md_megamenu/templates/menu/theme.inc).

Other than the errors the links now seem to work perfect thanks!

phuonght's picture
phuonght
Tue, 06/30/2015 - 06:24

Ok,

We fixed, Hmartens. Try again with new file and tell us if it works or not.

hmartens's picture
hmartens
Tue, 07/21/2015 - 03:05

Good day

I'm having another problem with my menu as sometimes when I hover over the menu it doesn't dropdown.

hmartens's picture
hmartens
Tue, 07/21/2015 - 03:13

A bit more info :)

I'm using Jquery Update 1.8.

MD Mega Menu Style 1.

When I move my mouse between two toplevel menu items they don't drop down. I have to move my mouse completely off the menu and then move on to the menu again for it to dropdown.

hmartens's picture
hmartens
Wed, 07/01/2015 - 06:35

Thank you very much for your awesome work! The menu seems to be working perfect now! Thank you for all your help. I appreciate it!

jtk's picture
jtk
Sun, 07/12/2015 - 09:49

Unfortunately I am having the same exact issue with image links in Slider. Is there any quick fix that I can do for this?

/jtk

jtk's picture
jtk
Sun, 07/12/2015 - 09:51

"#" (hashtags) in a link translate through to browser, "?" and "=" characters do not, they just get trimmed with any link information after these characters.

phuonght's picture
phuonght
Sun, 07/12/2015 - 23:22

Jtk,

We just sent you an update file to your email. Please check and see if it works.

If problem still exit, please send us your information to our email: [email protected]. We would like to check it for you.

hmartens's picture
hmartens
Wed, 07/22/2015 - 00:27

Good day

I'm having a problem with my menu as sometimes when I hover over the menu it doesn't dropdown.

I'm using Jquery Update 1.8.

MD Mega Menu Style 1.

When I move my mouse between two toplevel menu items they don't drop down. I have to move my mouse completely off the menu and then move on to the menu again for it to dropdown.

cindy's picture
cindy
Wed, 07/22/2015 - 03:24

Hi Hmartens

Please check your email for update file

hmartens's picture
hmartens
Wed, 07/22/2015 - 04:36

Hi, thanks for emailing me but you sent me the md_slider module and not the md_megamenu module?

cindy's picture
cindy
Wed, 07/22/2015 - 05:54

Hey,

Sorry for this inconvenience 

Please check your mail again

hmartens's picture
hmartens
Thu, 07/23/2015 - 02:27

Hi, thanks for the email. It is still not fixing the problem.

Thank you

phuonght's picture
phuonght
Thu, 07/23/2015 - 05:53

So,

Please send us your site url, admin and FTP accounts (forum link as well) via email: [email protected]. We would like to have a check.

hmartens's picture
hmartens
Mon, 07/27/2015 - 02:03

Good morning

I'm getting an error in md mega menu settings: "Warning: Invalid argument supplied for foreach() in md_megamenu_edit_links_form_submit() (line 1237 of /sites/all/modules/md_megamenu/includes/md_megamenu.admin.inc)."

And when I try to Edit the menu it shows all the menus on 1 page and I cannot save anything.

hmartens's picture
hmartens
Mon, 07/27/2015 - 05:16

I think it might be related to this issue: http://megadrupal.com/forum/module-support/mega-menu/142

But my mega menu is a bit different because you made it work with anchor tags for me.

Thanks

hmartens's picture
hmartens
Tue, 07/28/2015 - 04:07

Good morning. Have you been able to read my post about my problem yet?

cindy's picture
cindy
Tue, 07/28/2015 - 04:09

Please send us your site url, admin and FTP accounts (forum link as well) via email: [email protected]. (also this forum link)

dajuice's picture
dajuice
Wed, 12/23/2015 - 14:51

I have this same issue, can you please just tell me what file to make the change in so that links with # in them dont get overriden?  For example i have a sub page at http://fabulo.city/blog and in the menu it links to <Front>#something but it always overwrites the link to currentpage#

cindy's picture
cindy
Wed, 12/23/2015 - 21:42

Hi Dajuice,

We check your site http://fabulo.city/blog and see the menu still works fine without any problem

So, what exactly the problem is? Could you please describe more

green_eye55's picture
green_eye55
Thu, 01/28/2016 - 13:47

I have the same issue here using #anchors in menu links like "my-url#anchor". Im using version: 7.X-1.17. Is there a solution in version: 7.X-1.18 or how can I fix it?

phuonght's picture
phuonght
Thu, 01/28/2016 - 21:57

Green_eye55,

You could try with Mega menu version 7.x-1.18 from your account page (http://megadrupal.com/user/greeneye55) then check if it works.

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.