Extension talk:AnyWikiDraw

Loading problem
Hello,

Your extension seems to be very interresting and fun, and I have installed it on my wiki (v1.8.2). But when I want to edit an image, the Java applet can't be load. I have have open a "Java console" (it's a french word, I don't know if it's the same in english), and I have this error:

charger : classe org.anywikidraw.mediawiki.MediaWikiDrawingApplet.class introuvable. java.lang.ClassNotFoundException: org.anywikidraw.mediawiki.MediaWikiDrawingApplet.class at sun.applet.AppletClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.applet.AppletClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.applet.AppletClassLoader.loadCode(Unknown Source) at sun.applet.AppletPanel.createApplet(Unknown Source) at sun.plugin.AppletViewer.createApplet(Unknown Source) at sun.applet.AppletPanel.runLoader(Unknown Source) at sun.applet.AppletPanel.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: open HTTP connection failed. at sun.applet.AppletClassLoader.getBytes(Unknown Source) at sun.applet.AppletClassLoader.access$100(Unknown Source) at sun.applet.AppletClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 10 more

I don't know what is source of this problem... and I need some help. Sébastien 15:31, 16 April 2007 (UTC)

Quick workaround
Dear Sébastien,

This happens, because the script AnyWikiDraw.php fails to deliver the correct address of the file MediaWikiDraw.jar.

I have this problem too on one of my installations, and I don't know how to change the code, so that it will always deliver the correct address without having to patch the code.

As a quick workaround, you can do the following: In the File AnyWikiDraw.php, in function, there is a line that delivers the address of the applet: the line starts with   (thats near line number 124). On my problematic system, I did the following changes:

'&lt;applet codebase="/" archive="/extensions/AnyWikiDraw/AppletPack200.php/MediaWikiDraw.jar"'.

Depending on your platform, you may have to insert more path elements before the word "extensions". On my system, I had to write

I hope this helps. btw. make sure to update to AnyWikiDraw 0.6 for MediaWiki before you do this.

--Rawcoder 07:12, 17 April 2007 (UTC)

Resolved
Excellent! Now I can use this funny extension. Thank you for your help! Sébastien 12:09, 17 April 2007 (UTC)

Suggested Patch
I have found that this extension 'assumes' a directory structure. A more appropriate way would be to use the parameters defined in 'LocalSettings.php' to make the installation of this extension easier.

AnyWikiDraw.php code with patch
// edit the drawing using the applet global $wgArticlePath, $wgScriptPath; // patch JLD $uploadURL = str_replace('$1', 'Special:AnyWikiDraw', $wgArticlePath); // patch JLD $output .= ''. ' '.				''. ''. ''. ''. (($image->getURL !== ) ? 'getURL).'">' : ). 'getLocalURL).'">'. ''. ' '.				' ';

Jean-Lou Dupont 10:18, 20 April 2007 (UTC)

Dear Jean-Lou, Thank you very much for this patch. I have included it into version 0.7 of AnyWikiDraw for MediaWiki. --Rawcoder 05:52, 24 April 2007 (UTC)