Icon

YUI Menu & IE7 – Submenus Closing

Big fan of the whole set of YUI tools (http://developer.yahoo.com/yui/), but recently I’ve had an issue with the YUI Menu. The version I was using is the latest, v2.6.0

I use the YUI menu as a vertical menu, at the top of my web application. The menu and the application are quite extensive.  The menu system I use has the root menu, then when dropping down there are single items and submenus. I never go past a single tier of submenus.

It’s always worked great on my computer, until I upgraded to IE7. Each time I would use it, and try to click on a item in the submenu, the damn thing would close on me. It wasn’t 100% of the time, but well over 75% of the time. I eventually worked out a trick where if I held down the mouse button, and then moved the mouse I could keep the submenu open.

While a very small percentage of my user base is IE7 browser users, I couldn’t imagine what they were going through. It was annoying the hell out of me, and just made the entire application look bad.

After checking it on firefox, chrome, and IE6, I was able to realize it is just an IE7 issue. Unfortunately, I didn’t really find anyone else via google with this same problem.

After playing with it I finally fixed it:

1. I noticed that when the submenu was closing, it seemed to be finding elements behind it.

2. I increased the z-index of the menu. While this did not work alone, I still believe it helps.

3. When z-index didn’t work, I noticed in the documentation this nugget:

iframe Boolean false (true for IE) (Inherited from YAHOO.widget.Overlay.) Boolean indicating whether or not the Menu should have an IFRAME shim; used to prevent SELECT elements from poking through an Overlay instance in IE6. When set to “true”, the iframe shim is created when the Menu instance is initially made visible. This property is only applied when the “position” configuration property is set to dynamic and is automatically applied to all submenus.

4. While that appears to include IE7 in the default, I decided to force it on anyhow.

BAM! Submenu items fixed, YUI menu is wonderful again! No noticeable downside to Firefox and Chrome. Life is good.

Empty ClickOnce Error Message

Well, this error is pretty much the entire reason I decided to start my own blog. During the work day, I often look to the internet for the solution to errors or coding help. I feel I’ve become quite handy with google.com and rarely am I stuck with a problem for more than a few minutes.

Then I met this error. I even actually opened up an incident with Microsoft, something I once thought I’d never do. I’m not a Microsoft hater, nor do I doubt the answer was somewhere at Microsoft, perhaps by a lot of employees. But, I know how large corporations work, and it’s just frustrating working your way up the call ladder to get to someone who can actually help. I’d probably find a solution quicker by just formatting my machine and started from scratch.

Enough with the introduction, here’s the error.

At work I’ve developed an application that was to be deployed by clickonce. I published several versions and everything appeared to be working perfectly. We began to test the application on a wider range of machines as it came closer to application’s release date. It turns out that the ClickOnce applications that I was publishing, would not work on any machine that did not have all the prerequisites. If a machine was lacking any prerequisites, you could click on the “Install” button on the publish.htm but the user was instantly prompted by two empty dialog boxes.

error

 

As you can see, it’s very descriptive.

Anyhow, after some digging on the client machine, I did find an error in the Windows temp directory.

Error: An error occurred attempting to extract setup configuration file.
The following error occurred initializing the bootstrapper: “An error occurred attempting to extract setupconfiguration file.”

Google doesn’t bring up much on this error.

I had other developers try publishing the application after downloading it from source control. They had no problem publishing a working setup.exe. This problem was limited to my machine. So, I began creating new completely blank projects and immediately tried to publish them via clickonce. I got the same result each time. This problem was plaguing my entire machine, not just ClickOnce.

So, I started looking at the setup.exe my machine was publishing. Turns out my setup.exe was always 320kb. On the other development machines, they were 422kb. My setup.exe were a valid win32 image but, obviously they were missing something. I found out you could drag setup.exe’s into Visual Studio and examine them, so I did this:

badsetupexeresourceview

Bad Setup.Exe

 

 

And the good one:

goodsetupexeresourceview

 

Pretty major difference, right?

So, I searched my machine and found in previous projects my setup.exe were 422kb, so I had a time frame of where something went wrong. In one previous project I did a lot of work with certificates, so I spent some time trying to see if certificates were working on my machine, no luck.

Finally, I decided to remove a few programs each morning at work. (At the same time I was getting emails from my assigned Microsoft Tech telling me he thought it could be Firefox on the client machines). On the second day, I removed two programs: Microsoft’s WSE (Web Services Enhancements) 3.0 and .NET Memory Profiler Trial Version 3.0 by Scitech Software.

I loved the .NET Memory Profiler but my trial ran up and I even sorta forgot it existed, so I removed that. I still needed WSE but I was so convienced something with certificates had messed this up, I had to remove it.

Lo and behold after the removal of these programs, everything works again.

I reinstalled WSE and tried ClickOnce again, and everything was still fine.

I kept WSE and installed .NET Memory Profiler and my setup.exe was corrupt again. So, I’m somewhat certain that it was just the Memory Profiler but, I can’t say with 100%.

What I can say, is if you are having this problem, please remove WSE and any IDE add-on’s you have. Perhaps do it one at a time.

I let Microsoft know they could close my incident that although firefox on the client machines was a damn good suggestion (dripping sarcasm) but it was actually WSE or .NET Memory Profiler. I received a congratulations and was told that “WSE and ClickOnce is a known issue” Of course that pissed me off, I wish I would have been told that during the first phone call when I asked if anything could interfere with that.

Hope this saved someone out there some time that I lost.
UPDATE (3/14/08): Microsoft did refund my incident here. So, no harm no foul. Perhaps I’ll try their support again one day.

UPDATE (11/13/08): I’ve been using clickonce nearly daily since this incident and not one problem since. I have recieved some feedback from other people with this same issue, and it always seems to be solved by uninstalling some plugin software to visual studio. So, I believe the ultimate answer to this issue is to remove your plugins one by one.