Troubleshooting

Editize is a simple product with complex technology behind it. As such, there are a number of little things that have to be set up 'just right' for it to function correctly. In this section, we'll tackle some of the most frequently encountered problems along with their solutions.

Known problems with Editize are documented in the readme.txt file included with this distribution. If you suspect you have encountered a bug in Editize, check there for details.

Feel free to contact Customer Support if you are unable to resolve your problem with the instructions provided here.

General Java Applet Errors

The License File for Editize in this Web page is not found.

If the Editize applet displays a message box with this error message, it means the Java Plug-In was not able to download the license file for your Web site. This file should generally be called editize.hostname.lic, where hostname is the hostname of your Web site, and should be placed in the same publically-accessible (i.e. not password-protected) directory of your Web site as editize.jar.

Assuming you have placed this file where it belongs, it is possible that your organization's proxy server is interfering with the Java Plug-in's ability to download the license file. This usually occurs when a Microsoft Proxy Server (ISA) is in use. Microsoft Proxy Server uses a non-standard user authentication method called NTLM (a.k.a. challenge-response) that the Java Plug-in did not support until version 1.4.2. Download and install the latest Java Plug-In from http://www.java.com/ to correct this problem.

Another possibility is that your Web server is set up not to allow .lic files to be downloaded. The version of IIS included in Windows Server 2003, in particular, is configured this way by default. Try renaming your license file so that it has a different extension (e.g. editize.hostname.jpg) and then use the licensefileext property (see the Reference section for your chosen API) to tell Editize what that new extension is.

java.lang.ClassFormatError: com/editize/EditizeApplet (bad magic number)

This error indicates that the Java Plug-In tried to download the editize.jar file but instead your Web server sent it something else (e.g. a custom 404 error page). Usually this will happen if you have not correctly set the codebase property of the Editize API you are using.

Try typing the URL for editize.jar on your server into your Web browser. Does it download correctly? If so, try running Editize again. When the error occurs, open the Java Console for your browser (right-click the Java icon in the Windows System Tray) and look for a more technically detailed error message. A URL in the error message should indicate where the Java Plug-In is trying to download editize.jar from. Adjust the codebase property of your selected API to make sure this is pointing to the actual location of the editize.jar file.

The error will probably make it look like it's trying to download com/editize/EditizeApplet.class, but this actually the fallback that the plug-in tries when it fails to retrieve editize.jar from the same location.

java.lang.ClassNotFoundException: com.editize.EditizeApplet

The this error indicates that the Java Plug-In tried to download the editize.jar file but was unable to do so for some reason. Possible causes of this problem include:

Try typing the URL for editize.jar on your server into your Web browser. Does it download correctly? If so, try running Editize again. When the error occurs, open the Java Console for your browser (right-click the Java icon in the Windows System Tray) and look for a more technically detailed error message. A URL in the error message should indicate where the Java Plug-In is trying to download editize.jar from. Adjust the codebase property of your selected API to make sure this is pointing to the actual location of the editize.jar file.

The error will probably make it look like it's trying to download com/editize/EditizeApplet.class, but this actually the fallback that the plug-in tries when it fails to retrieve editize.jar from the same location.

java.lang.ClassNotFoundException: com.sitepoint.rapidapps.rapidedit.RapidEditApplet

The class name for the Editize applet was changed as of Editize 2.0 to com.editize.EditizeApplet. If you get an error message with 'rapidedit' in it, this means you're using an outdated version of your selected Editize API (editize.php, editizedotnet.dll, editize.wsc, or editize.js). Replace the version of the Editize API on your server with the one that came with the version of Editize that you wish to use.

International Character Sets

When my users try to input Chinese or other non-Latin characters into an Editize, all they see are little boxes where the characters should be.

As a Java applet, Editize supports international (including double byte) character sets. The source of the problem here is that Editize uses "Times New Roman" as its default font, which does not contain characters for Chinese text.

Try setting the basefontface property of your selected API to a font that you know contains the required characters. If Editize still doesn't display the text correctly, please contact our Customer Support department so we can help diagnose the problem.

The ASP.NET API

My form uses ASP.NET LinkButtons, and changes to the content in Editize are not submitted.

Editize relies on the client-side 'onsubmit' event handler of the form to submit the updated document. Unfortunately, because of an oversight on the part of Microsoft, this event is not fired when the form is submitted with a LinkButton.

Fortunately, you can tweak your code to get the LinkButton to trigger the Editize field submission. Here's how it's done (in your page's Page_Load method):

MyLinkButton.Attributes.Add("onclick","return __submitEditize();");

Do this for each LinkButton that you want to make submit the Editize field when it is clicked.

The ASP API

I get an error message when I try to register or use the Editize API for ASP (editize.wsc).

In all likelihood, you need to update the version of Microsoft Windows Script installed on your server. As of this writing, the latest version is 5.6, and may be downloaded for free from Microsoft.

Another possibility is that you have placed the editize.wsc file on a mapped network drive. Windows Script Components must always be placed on a local drive, and you'll get a fairly ugly and nondescript ASP error message if you try to use one that isn't.

The JavaScript API

I keep getting JavaScript errors when I try to use the Editize API for JavaScript to edit an existing document.

JavaScript does not like apostrophes (') or line breaks to appear within a string. Since both of these characters may appear in an HTML document that you supply for Editize to edit, you need to replace them with special character codes to prevent JavaScript errors from occurring. Apostrophes must be escaped with backslashes (\') and each line break must be replaced with \n.

See the index.php and default.asp sample scripts in the javascript folder of the Editize distribution for examples of how these special characters may be replaced in PHP and ASP, respectively. Similar techniques may be applied in most any other server-side language.

Can the JavaScript API for Editize be used with ColdFusion?

Absolutely! You just need to take care of the special characters, as discussed under the previous heading.

ColdFusion has a function named JSStringFormat that takes care of special characters in JavaScript strings. Assuming you have the document to be edited in a ColdFusion variable named htmlCode, here's how you would use JSStringFormat to display it with the JavaScript API for Editize:

<script type="text/javascript" src="editize.js"></script>
<script type="text/javascript">
var ed = new Editize();
ed.name = "example";
ed.display("<cfoutput>#JSStringFormat(#htmlCode#)#</cfoutput>");
</script>