CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Problem with Nice Menu module with in CiviCRM/IE
Pages: [1]

Author Topic: Problem with Nice Menu module with in CiviCRM/IE  (Read 1536 times)

leupi

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 2
Problem with Nice Menu module with in CiviCRM/IE
September 12, 2011, 05:56:36 pm
I am using the Nice Menu module in my Drupal 6 installation and it all seems to be working well in all browsers including IE, with one exception. When I go to a CiviCRM page then all of the dropdowns hide behind other items. This is ONLY happening on CiviCRM pages, the same menus are working fine when I am on non CiviCRM pages in Drupal.

I also have a form in CiviEvent where the user can choose a country and then a state/province. The state/province form populates depending on the country chosen, except in IE. I am getting the following 'Error on Page' message on IE:
Code: [Select]
Webpage error details



User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)

Timestamp: Tue, 13 Sep 2011 00:39:09 UTC





Message: Invalid procedure call or argument

Line: 1

Char: 1000

Code: 0

URI: http://connect.natureserve.org/sites/all/modules/civicrm/packages/jquery/plugins/jsTree.v.1.0rc2/jquery.jstree.min.js?d

I am wondering if all of the issues could be related? I could certainly understand the IE issues with the dropdowns as that is a common issue with IE but the fact that it only is an issue on pages that are getting the error message leads me to think that there is a connection but I don't know enough about JQuery to figure it out.

My page is at http://connect.natureserve.org. Any help is appreciated.

FatherShawn

  • Ask me questions
  • ****
  • Posts: 372
  • Karma: 25
    • C3 Design
  • CiviCRM version: 4.2.11
  • CMS version: Drupal 7.23
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
Re: Problem with Nice Menu module with in CiviCRM/IE
September 13, 2011, 04:06:10 am
IE Version?
Lead Developer, C3 Design.
Twitter: @FatherShawn

leupi

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 2
Re: Problem with Nice Menu module with in CiviCRM/IE
September 13, 2011, 05:00:21 am
I've had issues with IE 8 & 9. Not sure about any other versions, those are all that I have tested so far. In IE 9 I get a message that I need to enable JavaScript for the dashboard features of CiviCRM to work and I have verified that JS is enabled. On IE 8 I simply get an error message (the one that I posted earlier).

I'm only assuming that the menu issue is JavaScript related as I only get that message when I am on a CiviCRM page and they are the only pages on which the menus are not working properly.
« Last Edit: September 13, 2011, 05:23:28 am by leupi »

leupi

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 2
Re: Problem with Nice Menu module with in CiviCRM/IE
September 13, 2011, 06:12:31 am
I looked at the line in the file
Code: [Select]
/sites/all/modules/civicrm/packages/jquery/plugins/jsTree.v.1.0rc2/jquery.jstree.min.jsThat the error is pointing to and it reads:
Code: [Select]
if(tmp.styleSheet){document.getElementsByTagName("head")[0].appendChild(tmp);
[THIS IS CHAR 1000] tmp.styleSheet.cssText=opts.str}else{tmp.appendChild(document.createTextNode(opts.str));document.getElementsByTagName("head")[0].appendChild(tmp)}return tmp.sheet||tmp.styleSheet}

I added [THIS IS CHAR 1000] where character 1000 is, that was obviously not in the file itself. Any thoughts as to what the issue could be with that?

leupi

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 2
Re: Problem with Nice Menu module with in CiviCRM/IE
September 13, 2011, 07:00:39 am
Part of the problem is solved. I rewrote the following
Code: [Select]
if(tmp.styleSheet){
document.getElementsByTagName("head")[0].appendChild(tmp);
  tmp.styleSheet.cssText=opts.str
}
else{
  tmp.appendChild(document.createTextNode(opts.str));
  document.getElementsByTagName("head")[0].appendChild(tmp)
}
to read
Code: [Select]
$('head').append('<style type="text/css">' + opts.str + '</style>');and the state/province select box now dynamically fills depending on the country chosen. My admin menu in Civi is also now working; however, the menus that I created with nice menu are still acting funky when on a Civi page but again act normal in a standard Drupal page. Not sure what the issue is there.

leupi

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 2
Re: Problem with Nice Menu module with in CiviCRM/IE
September 13, 2011, 07:25:25 am
Problem solved.

I added this to nice_menu.js:
Code: [Select]
window.onload = function() {
  if (document.all) {
    //add decreasing z-index to avoid overlapping of menu items
    var menuzindex = 1000;
    var menu = document.getElementById('nice-menu-1');
    var items = menu.getElementsByTagName('li');
    for (var i = 0; i < items.length; i++) {
         items[i].style.zIndex = menuzindex;
         menuzindex--;
    }
  }
}
Not sure why it only needed that while in CiviCRM and not in standard Drupal pages but at least everything now works. Hopefully this will all help someone else.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Problem with Nice Menu module with in CiviCRM/IE

This forum was archived on 2017-11-26.