I am having a problem while attempting file uploads using FCK Editor 2.4.1. I am getting the following error:
Error on file upload. Error number: 203
Has anyone seen this before?
Should I consider updating to a more recent version of the editor? Any hints would be greatly appreciated.
My code is below:
web.xml
<servlet>
<servlet-name>Connector</servlet-name>
<servlet-class>net.fckeditor.connector.ConnectorServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Connector</servlet-name>
<url-pattern>/js/fckeditor/editor/filemanager/connectors/*</url-pattern>
</servlet-mapping>
fck.jsp
<%@taglib uri="http://java.fckeditor.net" prefix="FCK" %>
<script type="text/javascript">
function FCKeditor_OnComplete(editorInstance) {
window.status = editorInstance.Description;
}
</script>
<FCK:editor instanceName="platform_partner" height="250px" width="700px">
<jsp:attribute name="value"><s:property value="partner.info.platform_partner" escape="false"/> </jsp:attribute>
</FCK:editor>
Thanks,
Jack
Sat, 02/05/2011 - 01:01
#1
Re: FCK Editor upload error 203
Fixed.
The problem was that the struts2 out of the box filter doesn't recognize php files. Here are my changes (in bold):
web.xml
<filter>
<filter-name>struts2</filter-name>
<!--<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>-->
<filter-class>com.platform.my.struts2.helper.customFilters.MyFckHelperFilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- FCKEditor -->
<servlet>
<servlet-name>Connector</servlet-name>
<servlet-class>net.fckeditor.connector.ConnectorServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Connector</servlet-name>
<url-pattern>/js/fckeditor/editor/filemanager/connectors/*</url-pattern>
</servlet-mapping>
MyFckHelperFilterDispatcher.java (my custom filter)
package com.platform.my.struts2.helper.customFilters;
import org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class MyFckHelperFilterDispatcher extends StrutsPrepareAndExecuteFilter {
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
String url = ((HttpServletRequest)req).getRequestURI();
if (url.indexOf("fckeditor") < 0) {
super.doFilter(req, res, chain);
}
else{
chain.doFilter(req, res);
}
}
}
fckeditor.properties
connector.userActionImpl=net.fckeditor.requestcycle.impl.UserActionImpl
fckeditor.basePath=/js/fckeditor
connector.userFilesPath=/partner/uploads/
Re: FCK Editor upload error 203
your problem can be solved by the following :
you create folder classes in WEB-INF directory.
Next create file properties with name "fckeditor" in classes directory.
Next write the following code into fckeditor file:
connector.userActionImpl=net.fckeditor.requestcycle.impl.EnabledUserAction
OK.
Re: FCK Editor upload error 203
When attempting to create a custom portfolio, I tried to add an image to the FCKEditor, but received the error: 'Error on file upload. Error number: 203.
Steps to reproduce:
1. Login to http://qa2-osp.sakaiproject.org:8084/osp-portal/ as studenta/studenta (Course site)
2. Click 'Portfolios'
3. Click 'Add'
4. Choose 'Design your own portfolio' and click 'Continue'
5. Create a name for the page
6. Click 'Continue'
7. Click 'Add Page'
8. Provide a title for the page
9. Select the 'Text' layout
10. In the WYSIWYG editor, copy and paste some text from a word document
11. Click the 'Insert Image' icon to add an image
12. The FCKeditor Resources Browser appears.
13. Click 'Browse' to locate an image on your harddrive.
14. Click 'Upload' --> the error message 'Error on file upload. Error number: 203.' appears and the image does not upload.