Dreamstime

Wednesday, 8 January 2014

Zoundry Raven: Getting Raven To Work With MS Internet Explorer 9

Zoundry Raven (Raven) version 1.0.375 (and 1.0.500, if you were to compile from the source code) is only good with Microsoft Internet Explorer (IE) version 5.5 to version 8. Raven will NOT work after an upgrade to IE version 9 (IE9) on Windows7 .

There are two things that I noticed when I launch Raven after the IE9 upgrade:

  • In the main window, under "Blog Post Summary" I noticed that what got displayed was mal-formed. All blog posts starts with the word "ZoundryDocument", which shouldn't be there. Also, there were no pictures or formatting of any kind - when there should be. They look just like any plain unformatted text document.

    Mal-formed "Blog Post Summary" With IE9 Installed
  • Editing an existing blog post is not possible. The "Zoundry Error" message

    "Error: 'NoneType' object has no attribute 'tagName'"

    gets displayed, multiple times, when the WYSIWYG editor window is launched.

    The Error Message When Trying To Edit A Blog Post With IE9 Installed

The Fix

I have just spent the last couple of days going through Raven's source code, trying to find a fix after this upgrade to IE9. And luckily, the fix is actually quite simple. All that is needed to be done is to just delete a single character in the file "mshtmlcontrol.py", found in the directory zoundryraven-read-only\Raven\src\python\zoundry\appframework\ui\widgets\controls\advanced\mshtml.


If you were to open up this file in a text editor, you will see this line at line 364:

fname = os.path.join(tmpDir, u"_z_raven_mshtml_%s_tmp.xhtml" % d) #$NON-NLS-1$


Just delete off the x (in RED ) so that the line now reads:

fname = os.path.join(tmpDir, u"_z_raven_mshtml_%s_tmp.html" % d) #$NON-NLS-1$


After making this change, Raven started up and ran successfully without any problem. I have posted a couple of test posts to my blog (at blogger.com), some with pictures embedded in them (my pictures were uploaded to Picasa Web by the way). All went well.

What Happened In IE9?

Raven's WYSIWYG editor is actually a Microsoft COM based object that is borrowed from IE and embedded into Raven - found in the file "mshtml.dll", with codename "Trident". When we edit an existing blog post or view a blog post in the main window, Raven creates a temporary file for this blog post with the file name that is defined in line 364, as mentioned above. This file will then be loaded into the IE's WYSIWYG editor. What changed in IE9 is that this temporary file must have an extension of ".html" and NOT ".xhtml".

A simple solution but a needle in the haystack. I actually spent something like a week, barking up the wrong tree initially and got nowhere, before it hit on me that the file extension might be the cause of this problem. Lucky me. Programmer instinct I guess.


Note:
You will need to setup the Raven development environment and download the Raven's source code to fix this problem.

Update 12th March 2014
You can also download my compiled version of Zoundry Raven here.









12 comments:

  1. Any chance of uploading a compiled version of this version somewhere. I would love to use Raven on Windows 7 when XP ends in the spring.

    ReplyDelete
    Replies
    1. Please give me some time. I need to read up (and experiment) on py2exe.

      Delete
  2. No problem and thanks for your efforts so far.

    ReplyDelete
  3. Gee, thanks for the compliment. I have been using a lot of open-source software. I suppose now is the right time to give back to the community.

    ReplyDelete
  4. How are you getting on with py2exe?

    ReplyDelete
    Replies
    1. After about 3 weeks, I think I have got it working. I am currently testing the .EXE program that was created by py2exe on a freshly installed copy of Win7 Professional in a Virtualbox environment with MS IE9 installed. So far so good.

      Also, I just realized yesterday that Raven will run as Raven2Go unless some entries are made to the Windows registry - something that I do not fancy doing. The Raven installer (version 1.0.375 from Zoundry) does the necessary for us during the installation process. I trying to see if there is a workaround.

      Unlike creating an executable .EXE program written in 'C' or Pascal, creating a runtime deployment with py2exe turns out to be not as easy as I thought. py2exe failed to include quite a number of Raven's .py files and I have to manually include them myself. Also, 4Suite (a library that Raven uses) and embedded MS IE needs special treatment.

      Delete
  5. This comment has been removed by the author.

    ReplyDelete
  6. hanks for the feedback and the good news.

    As it happens I prefer the portable version and plan to use it in a VM too.

    Keep up the good work. XP support ends 8 April so no pressure. ;-)

    ReplyDelete
  7. The link to download my py2exe build of Raven can be found in my latest blog post:

    http://chuahtc.blogspot.com/2014/03/ravenplus-my-build-of-zoundry-raven.html

    ReplyDelete
  8. Hi there! I got the same problem with Zoundry Raven. I would like to fix it on my PC, but there is a problem. I cannot find a file named "mshtmlcontrol.py" on my Windows 7. What directory should I look at?

    ReplyDelete
    Replies
    1. Well, I found your fixed version of Zoundry Raven v. 1.0.502, RavenPlus here: http://chuahtc.blogspot.com/2014/03/ravenplus-my-build-of-zoundry-raven.html
      You did a great job. I really appreciate it! Finally the program works!!!

      Delete
    2. You might want to consider upgrading to Raven+ version 1.0.504:

      http://chuahtc.blogspot.com/2015/03/ravenplus-version-10504.html

      Raven+ version 1.0.502 might publish an empty post sometimes, which I've fixed in v1.0.503.

      On the file "mshtmlcontrol.py" that you were looking for, you will need to download the source code and setup the environment, if you want to fix it yourself - see "Note:" at the very end on this blog post.

      Happy Blogging.

      Delete