So I've inherited a half-finished custom plugin which allows users to share directories between themselves (Share Resource). Errors from it come back blank, and about all I've been able to discern so far is that the xml.checkError() is returning true. When I attempt to use getErrorNumber(), though, I get a -1. Is it just failing to find any XML at all, or is there a specific -1 error code I'm missing?
sample check below:
api.connector.sendCommand('ShareResource', funcParams, function(xml) {
if (xml.checkError()) {
var customError = xml.getErrorNumber();
alert(customError);
return;
}
else {
...
sample check below:
api.connector.sendCommand('ShareResource', funcParams, function(xml) {
if (xml.checkError()) {
var customError = xml.getErrorNumber();
alert(customError);
return;
}
else {
...
Re: Error Reporting?
Before digging deeper into this issue, could you check in Firebug, Fiddler or any other HTTP tool what exactly the server connector is sending as a result? Check whether the XML response is really valid, maybe something else apart from XML is sent (e.g. warnings, error messages, debug messages etc.), maybe content type is not set to text/xml etc.
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+