All Menu Links Broken with 404 https redirect

I am using the Neros theme with the Mega Menu extension. Everything seems to have installed properly and is working normally, except the links in the menus to internal categories.

All of the links to categories are broken to include part of the https URI of the site.

For example, this is the link used by the stock Magento menu:

Code:

http://www.mydomain.com/storefolder/sports/shop-by-sport/baseball.html

If I enable JM Mega Menu this link becomes:

Code:

http://www.mydomain.com/storefolder/https://www.mydomain.com/storefolder/index.php/sports/shop-by-sport/baseball.html

Everything works fine with the stock Magento menu, but breaks when I enable JM Mega Menu. Is there some setting I am missing? Is there an incompatibility with SEF URLs? Some SSL setting?

9 answers

Profile photo of Sherlock 0.00 $tone July 8, 2013
Public

Hi pwmozingo,

Did you enable Secure url for admin section ? look like a bug with jmmegamnu in case of secure url enable, you can try to replace the file of app\code\local\Wavethemes\Jmmegamenu\Block\Adminht ml\Jmmegamenu\Edit.php with my attached file here, let me know if that helps

#1
Profile photo of Paul Mozingo 0.00 $tone July 8, 2013
Public

Thanks very much for looking at this. Yes, I am using the https for the admin section. When I turn this off, menu item creation seems to work normally, but once the new store goes live I will have to have this enabled.

Substituting the new "edit.php" file actually seemed to make things worse. (Actually, my server is case sensitive so I had to rename it to "Edit.php").

With the new file in place and caches cleared the "Link" field displays an https URL, which is required and is not disabled. Clearing it out won’t let me save. Editing it in any way won’t fix existing menu items. They still work the same as described above. Adding any new menu items creates menu items that just point back to the home page.

When I put the old file back it seemed like some of the edited menu items were trying to point to the wrong category -- maybe the parents of the intended category.

It seems like this may be the right place to make the fix but it isn’t working yet.

#2
Profile photo of Sherlock 0.00 $tone July 9, 2013
Public

ok mate, look like we need one more change, you can open that file (the new file I gave you), look for this snap of code

PHP Code:

  if(Mage::getStoreConfig("web/secure/use_in_adminhtml")){
                    
$baseurl Mage::getStoreConfig("web/secure/base_url");
     }else{
                    
$baseurl Mage::getBaseUrl();  
         } 




right below it you add this line of code

PHP Code:

  if(!strpos($baseurl,"index.php")) $baseurl .= "index.php/"




finally you go to Jmmegamenu’s back-end re-save your menu items to see if that does help
if this still does not help you can pm me your url, admin account as well as the FTP info I will check it further for you

#3
Profile photo of Paul Mozingo 0.00 $tone July 10, 2013
Public

This is still not working, but I am not sure the current issues are related to the original problem. Now I am getting a javascript error, which I think may be causing a number of important things to fail. When I diff the original file from the template with the one you sent, I am getting quite a number of changes that don’t seem related to this one problem. In fact, the JS error I am getting is this:

TypeError: ‘null’ is not an object (evaluating ‘$(‘menugroup’).observe’)

The $(‘menugroup’).observe function is not present at all in my original version. I haven’t looked at it carefully, but I am not sure it looks like something you would have added to address the https issue. Is this a newer version of the same file?

The effects of the error are:
-- the "Link" field is active, even if "Categories" is selected as the "Menu Type".
-- the baseurl filtering doesn’t seem to happen (based on a quick "alert" I added)
-- the "Link" field does not get updated when the categories are changed.
-- as before, old links are not fixed when saved and new ones all point to the home page (which I guess makes sense if the JS that sets up the URL is not functioning)

I just went back and checked versions on the Megamenu that I have vs. the latest in the "Extensions" area. It looks like the one I downloaded with the template is v1.03 from 12/12. The current release seems to be v1.07, but I don’t seem to have access to download that one. I suppose that accounts for the differences.

#4
Profile photo of Paul Mozingo 0.00 $tone July 10, 2013
Public

I guess because I am a single-theme purchaser I cannot download from the page you provided a link to. I can only download from the JM Neros page, which contains the older version of the Megamenu extension. I would need to do some account work to isolate the development site before I could provide FTP credentials. I can do that if it comes to it, but I could make the same changes to the old version if you can provide a diff of them. What would I need to do to get access to the updated extension? Purchase a membership? Will this change be rolled into an update to the Neros theme?

#6
Profile photo of Sherlock 0.00 $tone July 11, 2013
Public

Hi mate,

I have reported this to dev team about this issue and probably the Jm megamenu lastest version will be exported to Jm neros download section tomorrow, once it done you can download from there

#7

This question is now closed

Written By

Comments