« Swings and roundabouts | Main | It's not every day our projects get in the news »

Why on earth have my drop downs stopped working?

So. This has been just about the most frustrating search for a "bug" I've been involved in.

First, the reporter was miles away, and it was only her computer and other unspecified machines that exhibited the problem.

Second, I couldn't replicate the problem. It appeared to be related to a combination of IE7 and Norton 2006 Internet Security Suite. IE7 I've got - Norton 2006 I couldn't, despite being willing to pay for it, just so I could see this problem for myself.

Third, it was something infrastructural in Plone that wasn't working, yet I could find no reference to anyone else reporting the problem.

Fourth, she was signing off the project, and there was no way we were going live until it worked, even though it appeared to only affect a tiny proportion of users.

The problem as described to me was that the document action drop downs had "stopped working". Just stopped. Some time in November, apparently.

It's a long story, and I won't bore you with the hideous details of how I finally got to the answer, but for anyone else who's got the same problem (and surely someone else must have?) here's what you do to fix it.

The problem is described as follows:

  • You have Plone 2.1.x
  • Your user is using IE7
  • Your user has MS Office 2003 or above installed
  • Your user has Norton Internet Security 2006 installed
  • They tell you that the dropdowns "don't work"
  • No amount of fiddling with security settings will fix it, and no errors are generated.

To fix it:

  • download the latest Plone 2.5.
  • Replace your current kupu product with the kupu from your new Plone
  • Restart Zope and get your affected users to clear their browser cache

Lo! the drop downs will now work.

Why?

Plone 2.1.x ships with three different copies of sarissa.js (one in Archetypes, one in CMFPlone and one in kupu). For Plone 2.1.1, Plone 2.1.2 and Plone 2.1.3 they are all the same. All of them seek to instantiate Msxml2.DOMDocument.5.0 as their first choice of MSXML component.

In Plone 2.1.4 the version in Archetypes has been updated to remove the attempt to instantiate MSXML5.0 but this doesn't actually matter, because if you have kupu enabled it is the one from kupu that your users get (due to the order of skins resolution by default), and that one still tries for MSXML5.0.

MSXML5.0 is "bad", (see this post by one of the Microsoft XML team for a detailed explanation) and will generate a 'gold bar' in IE7 (i.e. the user will be told of a security risk and asked if they want to proceed). Norton kindly just throws this message away, so things just stop working without the user being informed, leaving you scratching your head.

By upgrading kupu you will get the right version of sarissa delivered to the user. Why am I using kupu from the Plone 2.5 distribution, rather than downloading it from kupu.oscom.org? Well, at the moment at least, the latest version available for download from the kupu site is 1.3.5 (which still uses the old version of sarissa), while the version that ships with Plone 2.5 is 1.3.9 and has the correct sarissa version.

An aside...

It's worth also noting the version of sarissa.js (0.9.6) that ships with kupu 1.3.9 (and hence Plone 2.5) still tries for MSXML4.0 and doesn't try for MSXML6.0, something that was changed in Sarissa 0.9.7. Not that this doesn't work, but it's not recommended practice.

Because of this it might make sense to upgrade your version of sarissa.js to the latest version, particularly if you're making use of boilerplate code from the Plone Javascript or you expose some of the standard dropdowns to a very wide audience. It's quicker and more stable, and the versions of MSXML that it relies on are still well serviced by Microsoft. I've not tried this myself though, so YMMV.

You can get it from http://sarissa.sourceforge.net/

I know that Javascript is a major point of focus for the Plone 3.0 development team, so hopefully these sorts of problems should pass soon enough.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)