The word 'false' appears in the menu

RoPey - July 21, 2008 - 22:33
Project:SimpleMenu
Version:6.x-1.x-dev
Component:User interface
Category:support request
Priority:critical
Assigned:Unassigned
Status:closed
Description

I have been using SimpleMenu for a couple of weeks and all was well. However, I have now started using a static front page by creating a page_front.tpl.php and a page_default.tpl.php and using a piece of PHP code in the page.tpl.php as follows:

<?php
       
if ($is_front) {/* check if it's the front page */
           
include 'page-front.tpl.php'; /*load a custom front-page.tpl.php */
           
return; }
       
        include
'page-default.tpl.php'; /*if none of the above applies, load the page-default.tpl.php */
           
return;
?>

That is the only code in page.tpl.php, absolutely nothing else is in the file.

Since I made this change, on all the menus in SimpleMenu, the word 'false' appears in each menu in addition to the menu items. It is not appearing as a menu item, but lies under (or over) the menu options, slightly to the left and just slightly above the level of the second menu item. It appears to be in a courier font. Please see screengrab. This only happens in IE7, not Firefox or Opera.

Could you give me a steer as to why this may be happening?

Thanks

AttachmentSize
simplemenu.gif3.23 KB

#1

Shane Birley - July 25, 2008 - 19:35

I can confirm this issue. I have gone through the CSS and can't find any conflicts yet. It must be an issue in the script.

#2

simonyost - August 21, 2008 - 15:34

I can also confirm this issue. For me it only happens in Vista+IE7. FF, Safari, IE6, IE7 on other platforms are okay.

#3

lutegrass - September 1, 2008 - 22:50

I only notice this on my windows server installation. Doesn't happen on my Mac MAMP install. Weird.

#4

dellis - September 5, 2008 - 18:37

Okay, after a little browsing, I found a few links...

From: http://weblogs.asp.net/bleroy/archive/2005/08/09/how-to-put-a-div-over-a......
"Update to the update: "javscript:;" is fine if your div is not transparent, but it will display an error message on the iFrame, so it should be avoided for transparent divs. By the way, if your div is transparent, you need to make the iFrame itself completely transparent (using an Alpha filter). That won't affect the hiding power of the iFrame (selects will actually not show through the div).

Update to the update to the update: thanks to David Anson and Kirti Deshpande who pointed me to this neat trick: using "j avascript:'';" works well in all cases, even transparency, and avoids the https alert."

I'm sure it won't fix the problem for everyone, but I did two things to fix this problem..

Open up simplemenu.js...
1. take the code from superfish.js (found here: http://users.tpg.com.au/j_birch/plugins/superfish/#download) and replace the older version found in simplemenu.js.
2. look for the "(function($){$.fn.bgIframe=$.fn.bgiframe= ..... " stuff at the bottom of simplemenu.js. Find the line that says: src= 'javascript:false;' and change it to one of the two options above... I changed it to read: src= 'javascript:;' because the other one didn't quite work for me.

That is about it. So far it looks good in IE6 again (and all others that I've tested).

Hope that helps someone else...

#5

maxbraff - October 9, 2008 - 20:45
Priority:normal» critical

the only problem now is that i get an » symbol on all my drop down menus. I've cornered the problem to the updated superfish.js file. However, with my super non-js language skills, I can't locate it any farther. Down grading to the old superfish.js just unsolves the main problem in the first place. I am changing this problem to critical so it can get fixed for the next release...hopefully there will be IE support as well as no ».

EDIT:

I just updated to IE7 and it works great. So, its a suggestive to update IE. As for the other problem, it still needs solving.

#6

psynaptic - October 20, 2008 - 14:21

I am experiencing an issue with simplemenu in IE6 where the word false appears and the menu is visually broken. Works perfectly in IE7 however.

#7

XerraX - October 30, 2008 - 10:55
Status:active» fixed

just delete the & #187; symbol (without the whitespace) in the superfish.js to remove the »

#8

psynaptic - November 10, 2008 - 12:47
Status:fixed» needs review

Marking as patch (code needs review) since this has not been committed and can't be considered fixed.

#9

lionstone - December 23, 2008 - 03:02

Another approach - ( for 5.5 ) I just changed the bgIframe code in simplemenu.js to the following (ensuring that the opacity filter is set) :

Works like a charm for vista

(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&/6.0/.test(navigator.userAgent)){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+'style="display:block;position:absolute;z-index:-1;'+'filter:Alpha(Opacity=\'0\');' +'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+'"/>';return this.each(function(){if($('> iframe.bgiframe',this).length==0)this.insertBefore(document.createElement(html),this.firstChild);});}return this;};})(jQuery);

#10

Johnson2 - December 30, 2008 - 11:59

Just installed fresh Drupal and this module, I see the "false" in the menu. Only in IE.
I tried all the solutions that were insisted here, none of them worked for me. I am using drupal 6.8
Please provide more help.

#11

maxbraff - January 2, 2009 - 01:35

make sure you enable IE safe or something like that in the options.

#12

psynaptic - January 21, 2009 - 13:29

There is no IE safe setting. Not that I can find anyway.

#13

psynaptic - January 21, 2009 - 21:34

Can anyone else confirm the above fix works for both IE6 and IE7. Does anyone see anything but a perfectly working simplemenu?

#14

mikeskull - February 14, 2009 - 12:15

Just to confirm I also get this problem on IE7.0.6001 using Windows Vista, tried replacing the superfish.js and then removing the word "false" as per dellis' comments, but this only made the background of the iframe show the "page cannot be displayed message", putting " marks around the ; didnt work either. Works perfectly in FF3 on same OS and as i am the only one who will see the menu its not an issue (as i use FF3). Just thought I woud see if I could add any value to this.

#15

psynaptic - February 14, 2009 - 20:14

I had the exact same experience as mikeskull. Just thought I'd let you know.

#16

remi - February 27, 2009 - 20:19

We're experiencing the same problem in IE 7.0.6000 on Windows Vista.

Subscribing.

#17

jmai - March 1, 2009 - 15:30

I got mine fixed following solution #9. I copied and replaced at the end of the simplemenu.js file. Simple and easy, no more false. Thanks lionstone

#18

generaltao - March 2, 2009 - 19:26

Same for us - we used the fix in post #9 and it worked like gangbusters. Thanks for the help, lionstone!

#19

remi - March 3, 2009 - 18:56

We tried the suggested code at comment #9 at it works, like generaltao mentioned. Attached is the resulting patch file from the changes to simplemenu.js.

AttachmentSize
simplemenu_285533_1167570_false_in_ie.patch 2.29 KB

#20

cr0nky - March 9, 2009 - 18:07
Version:6.x-1.x-dev» 6.x-1.2

It seems like the "false" is only appearing on expandable menus. An arrow icon should be rendering on these menus as well but is not for me in IE 6. Is there a relationship between the "false" appearances and the missing arrows?

#21

Ingumsky - March 24, 2009 - 12:26

>> lionstone, remi
Thank you! #9 (and #19) solved the issue for me.

#22

Roger López - March 31, 2009 - 23:58

aha! found it!

the invokation of bgIframe was using {opacity:false}. I don't know why it is invoked this way and it seems completely unnecessary. Removing that option fixes this in IE6. I could never replicate this in IE7, so please tell me if this fixes it.

BTW, thanks for all the code fixes above. I prefer not to modify the 3rd party bgIframe code, since it will then be up to us to maintain that code.

AttachmentSize
simplemenu.patch 749 bytes

#23

Roger López - April 1, 2009 - 00:08
Version:6.x-1.2» 6.x-1.x-dev
Status:needs review» fixed

committed: http://drupal.org/cvs?commit=191380

#24

psynaptic - April 1, 2009 - 15:19

Awesome, will get my users to test..

#25

System Message - April 15, 2009 - 15:20
Status:fixed» closed

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

#26

Andrew Jamieson - October 14, 2009 - 13:15

neither #9 nor #22 did work for me ;(
Any other ideas?

 
 

Drupal is a registered trademark of Dries Buytaert.