My website menu is not displaying properly in IE. I'm not sure where else I can get answers for this.

I've attached a screen shot for both IE7 and IE9 for the errors - however, the menu works properly in other browsers.

Thanks for your help!

CommentFileSizeAuthor
screen-marinelli-ie.jpg227.46 KB3charlotte
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

F0rumus3r’s picture

I don't have an answer for you but I am experiencing a similar issue with my drop downs on IE9. If I figure out a solution I will update you.

3charlotte’s picture

Thanks for keeping an eye out for this one, but I found the fix for this.

I had some Menu links that were disabled, and for some reason, that is what was causing IE9 to break the Menu Navigation on the front end.
After I moved the disabled links down after the last active link - Menus started rendering properly on IE9.

I can't explain why IE would be the only browser that this happens in...

3charlotte’s picture

Status: Active » Fixed
F0rumus3r’s picture

Glad to hear! Bizarre that it would do that!

fietserwin’s picture

Category: support » bug
Status: Fixed » Needs review

When menu items are disabled the html that gets rendered is invalid, so this is a bug and pretty major, though it only occurs with disabled menu items. A quick inspection of the code lead me to:

file: marinelli/theme/theme.inc

function: marinelli_mega_menu($variables) {
...
          if (theme_get_setting('menu_headings') == 1) { // && $value2['below']) { // use a list
            $output .= '<ul class="megamenu-section">'; // open section list

            if ($value2['link']['hidden'] != 1) { // check if the link is hidden
              $output .= '<li class="menu-section-title" id="' . $id . '">' . l($value2['link']['link_title'], $value2['link']['href'], $options);
            }
          }
...
            if (theme_get_setting('menu_headings') == 1) { // close the list only if we use <li>
              $output .= '</li>'; // close 2ndlevel <li>
              $output .= '</ul>'; // close section <ul>
            }
...
}

So the {li} is not emitted if the link is hidden, but the {/li} is. Changing this to:

function: marinelli_mega_menu($variables) {
...
          if (theme_get_setting('menu_headings') == 1) { // && $value2['below']) { // use a list
            $output .= '<ul class="megamenu-section">'; // open section list

            if ($value2['link']['hidden'] != 1) { // check if the link is hidden
              $output .= '<li class="menu-section-title" id="' . $id . '">' . l($value2['link']['link_title'], $value2['link']['href'], $options);
            }
          }
...
            if (theme_get_setting('menu_headings') == 1) { // close the list only if we use <li>
              if ($value2['link']['hidden'] != 1) { // check if the link is hidden
                $output .= '</li>'; // close 2ndlevel <li>
              }
              $output .= '</ul>'; // close section <ul>
            }
...
}

Works for me. I hope the theme maintainer can use this to see if my findings are correct and if this might occur in other places as well.

The fact that only IE gets messed up, is probably because they have different html parse error handling.

3charlotte’s picture

Thank you!

I also just moved my disabled links to the end of my menu, that way I wouldn't touch/break any code.

jjsmyth1984’s picture

Hi Guys,

I am having the same issue and can't seem to identify a fix. Is anybody else having this same issue? Would be great to get a set in stone solution to this bug as I love this theme :)

Any feedback at this time I would be super grateful.

Cheers,

Joe