Description

Clicking on an existing twikidraw drawing opens the java drawing applet as expected. Choosing "Save and Exit" causes the .draw file on the wiki to update, but the .png file does not. So there is no way to update an existing drawing in the wiki. Again, the .draw file updates, but not the actual image.

For new drawings (e.g. drawing:foo), the same behavior occurs, effectively preventing the new drawing from ever being created (even though the .draw file gets created and updated).

If one uses the "URL Tool" in twikidraw to force it to create a .map file, then the drawings (and the PNGs) are saved as expected. But then you can no longer click on a drawing to edit it.

Your task is to reproduce this problem on at least 5 of all combinations of: moin 1.6, IE6, IE7, Firefox, Opera, MS Java, Sun Java. Present your results in a structured way.

To finish this task, one will spend around 10h of work. This task needs to be be completed within 7 days.

Steps to reproduce

  1. try to edit an existing drawing
  2. try to create a new drawing
  3. Note: I just added a magenta circle to this drawing that didn't make it back into the png. I wonder if this is an issue with the java version? From this machine I'm using IE 6, which with an <applet> tag uses Microsoft java, which reports itself as java 1.1.4.

  4. Note: I think it is java-specific. I see this problem when using Windows XP with IE6. I installed the Sun jre 1.5.0_06 on a Red Hat Enterprise Linux 4 workstation and configured the java plugin for firefox 1.0. That configuration is working fine with twikidraw both on this wiki, and my internal wiki. This seems to indicate a problem with twikidraw running under IE6's java plugin. I know that twikidraw with older versions of Windows/IE/Moinmoin worked in the past, but something is different now that's breaking it. Can someone else confirm Windows XP problems? Just edit the drawing on this page, make a change, and "save and exit" to see if your change is displayed on this page or not.

testdrawing.tdraw

Example

None.

Details

MoinMoin Version: Release 1.3.5 [Revision 1.3.5 release]

Bug is not solved in MoinMoin Version 1.5.1

OS and Version: Red Hat Enterprise Linux WS release 4 (Nahant)

Python Version: 2.3.4 (#1, Nov 4 2004, 14:06:56) [GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)]

Server Setup: basic install

Server Details: basic install

Workaround

The easiest workaround for this bug seems to be to install SUN Java:

I was finally able to get twikidraw to work properly under Windows XP/IE6 by changing the code in AttachFile.py to use the OBJECT tag instead of the APPLET tag. This is only a stop-gap test for now, though, because non-IE browsers don't use the OBJECT tag the way IE does (good grief). I haven't had time to digest it all yet, but Sun has a bunch of info on this subject at http://java.sun.com/j2se/1.5.0/docs/guide/plugin/developer_guide/using_tags.html, which I think describes methods for invoking applets so that all the browsers are happy.

update: OK, I used Sun's HtmlConverter software to change the original <applet> tag to a combination of <object> and <embed>. This scheme now works on both IE and Firefox. I did modify the clsid in the <object> tag that the HtmlConverter used to be the one that means "the latest jre on the system", and I took out the references to jre 1.5. Here is a diff of the changes I made to my 1.3.5 moinmoin installation to fix this issue:

$ diff AttachFile.py AttachFile.py.orig
309,347c309,318
<
< <!--"CONVERTED_APPLET"-->
< <!-- HTML CONVERTER -->
< <object
<     classid = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
<     WIDTH = "640" HEIGHT = "480" >
<     <PARAM NAME = CODE VALUE = "CH.ifa.draw.twiki.TWikiDraw.class" >
<     <PARAM NAME = ARCHIVE VALUE = "%(pubpath)s/twikidraw.jar" >
<     <PARAM NAME = "type" value = "application/x-java-applet">
<     <PARAM NAME = "scriptable" value = "false">
<     <PARAM NAME = "drawpath" VALUE="%(drawpath)s">
<     <PARAM NAME = "pngpath"  VALUE="%(pngpath)s">
<     <PARAM NAME = "savepath" VALUE="%(savelink)s">
<     <PARAM NAME = "basename" VALUE="%(basename)s">
<     <PARAM NAME = "viewpath" VALUE="%(pagelink)s">
<     <PARAM NAME = "helppath" VALUE="%(helplink)s">
<
<     <comment>
<       <embed
<             type = "application/x-java-applet" \
<             CODE = "CH.ifa.draw.twiki.TWikiDraw.class" \
<             ARCHIVE = "%(pubpath)s/twikidraw.jar" \
<             WIDTH = "640" \
<             HEIGHT = "480" \
<             drawpath ="%(drawpath)s" \
<             pngpath  ="%(pngpath)s" \
<             savepath ="%(savelink)s" \
<             basename ="%(basename)s" \
<             viewpath ="%(pagelink)s" \
<             helppath ="%(helplink)s"
<           scriptable = false
<           pluginspage = "http://java.sun.com/products/plugin/index.html#download">
<           <noembed>
<             <strong>NOTE:</strong> You need a Java enabled browser to edit the drawing example.
<             </noembed>
<       </embed>
<     </comment>
< </object>
<
---
> <applet code="CH.ifa.draw.twiki.TWikiDraw.class"
>         archive="%(pubpath)s/twikidraw.jar" width="640" height="480">
> <param name="drawpath" value="%(drawpath)s">
> <param name="pngpath"  value="%(pngpath)s">
> <param name="savepath" value="%(savelink)s">
> <param name="basename" value="%(basename)s">
> <param name="viewpath" value="%(pagelink)s">
> <param name="helppath" value="%(helplink)s">
> <strong>NOTE:</strong> You need a Java enabled browser to edit the drawing example.
> </applet>
Note

This patch works for MoinMoin Version 1.5.1 too, but you have to adjust it to the new line numbers of file AttachFile.py.

Discussion

May be related to MoinMoinBugs/TWikiDrawOnDebian, I'm not sure...

I think that if you press reload the image finally updates.

Please reopen it if you have still this problem. Also test anywikidraw. -- ReimarBauer 2009-11-27 20:10:25

Plan


CategoryMoinMoinBugFixed