Closed (fixed)
Project:
Drupal core
Version:
5.x-dev
Component:
base system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Jan 2008 at 04:52 UTC
Updated:
15 Oct 2008 at 22:03 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedThis is by design:
The proper, reliable way to use multiple XML-RPC calls is to wrap them in a try/catch block. For example:
I think that however the proper way to handle this would be to modify xmlrpc so that it will throw an exception on failure, rather than simply setting a static variable. Unsetting the static variable could be problematic, as there may be contributions which are using xmlrpc_errno() in a way which checks to see if anything in a series of XML-RPC calls has failed.
Comment #2
Anonymous (not verified) commentedComment #3
jvandyk commentedPatch adds a reset function to xmlrpc_error(). boydjd, I think the caller would be responsible for keeping track of the success/failure of xmlrpc() calls.
Comment #4
Anonymous (not verified) commentedRegardless of who or what should be responsible for keeping track of the success/failure of xmlrpc() calls, as long as we're not modifying xml-rpc core then we should be okay.
+1 on the patch, applied against HEAD and works properly.
Comment #5
vladimir.dolgopolov commentedIt seems the same problem:
XMLRPC library does not reset xmlrpc error code before a new xmlrpc call is requested
http://drupal.org/node/56715
Comment #6
Anonymous (not verified) commentedAgreed, duplicate with duplicate patch.
Comment #7
Anonymous (not verified) commentedI take that back, the other patch resets the error code every time a call is made, which is not desired functionality.
Comment #8
dries commentedRelated problem. In common.inc we do:
Note that $result->code is not set!
Then in xmlrpc.inc we do:
Because $result->code is not set, no xmlrpc_error() is set either.
Comment #9
dries commentedSpecifically, I have an xmlrpc() call that results in a "111 Connection refused" but that error does not propagate to the XML-RPC layer due to the above mentioned bug.
Comment #10
gerhard killesreiter commentedThis patch is clearly needed for successful usage of Drupal's xmlrpc library. It applies to D5, 6 and 7 and should IMO be applied to all three.
Comment #11
dries commentedI've tested this patch and committed it to CVS HEAD. I also believe it is ready to be committed to DRUPAL-6 but I'll leave that up to Gabor to decide.
Comment #12
gábor hojtsyAgreed. I've added a newline at the end of the xmlrpc.inc file so CVS is happy, and committed that. Also applies to Drupal 5.
Comment #13
drummCommitted to 5.x.
Comment #14
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.