API page: http://api.drupal.org/api/drupal/core%21modules%21xmlrpc%21xmlrpc.server...
Enter a descriptive title (above) relating to function xmlrpc_server, then describe the problem you have found:
The parameter to xmlrpc_server() appears to be a complex array, but it is not documented.
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | d7-document_parameter_xmlrpc_server-1956782-16.patch | 607 bytes | joshi.rohit100 |
| #12 | document_parameter_xmlrpc_server-1956782-12.patch | 714 bytes | bdimaggio |
| #10 | document_parameter_xmlrpc_server-1956782-10.patch | 713 bytes | bdimaggio |
| #6 | 1956782-6-document_parameter_xmlrpc_server.patch | 822 bytes | tanmayk |
| #2 | 1956782-document_parameter_xmlrpc_server.patch | 604 bytes | chertzog |
Comments
Comment #1
jhodgdonLooking at the code, it appears that you can pass in callbacks as documented there (it's not *well-written* documentation, but it is implied that the array key is the xml-rpc name and the value is the name of the callback function, and that is correct as far as I can tell). Or you can do something more complex. You are probably right that the documentation should be fixed up.
Comment #2
chertzoghere is a simple attempt.
Comment #3
jhodgdonThat's a good start!
Looking at the one calling function for this, it passes in the result of invoking:
http://api.drupal.org/api/drupal/core!modules!xmlrpc!xmlrpc.api.php/func...
on all modules.
That hook already has extensive docs on the return value structure. So maybe we could just say here "Either (what you wrote in the patch) or a more complex structure describing XMLRPC callbacks as returned from hook_xmlrpc()." or something like that?
Comment #4
lokapujyaThe one function that calls this has a comment: @deprecated Use \Drupal\xmlrpc\Controller\XmlrpcController::php().
The one place that calls the deprecated function has a @todo Remove xmlrpc_server_page().
Comment #5
joachim commentedFair enough, though this needs doing on D7.
Comment #6
tanmaykPatch against 7.x.
Comment #7
joachim commented> The one function that calls this has a comment: @deprecated Use \Drupal\xmlrpc\Controller\XmlrpcController::php().
> The one place that calls the deprecated function has a @todo Remove xmlrpc_server_page().
I think this still needs documenting on D8, regardless of the above.
XmlrpcController::php() calls xmlrpc_server_page(), which calls xmlrpc_server(). And we don't ever know if @todos will actually get done this cycle!
Howevever, it does look like the array that xmlrpc_server() expects is the same kind of thing that https://api.drupal.org/api/drupal/core!modules!xmlrpc!xmlrpc.api.php/fun... returns, so we could maybe just refer to that?
Comment #8
bdimaggioI think joachim's suggestion makes sense. I'll submit a patch accordingly in a minute.
Comment #9
bdimaggioComment #10
bdimaggioTook jhodgdon's suggestion (#3) as well as joachim's (#7).
Comment #11
jhodgdonLooks fine to me, thanks!
Comment #12
bdimaggioOK, maybe being perfectionist, but I noticed that I called it "XML-RPC" the first time and "XMLRPC" the second. "Fixing" that. Sorry to force an extra round of review, jhodgdon...
Comment #13
jhodgdonThanks! Perfectionism is fine. :)
Comment #15
jhodgdonCommitted to 8.x. Thanks again!
Now we need to go back to 7.x and figure out what to do there. There was a patch on #6... it seems like the 8.x patch would be a better starting point (assuming 7.x works the same)?
Comment #16
joshi.rohit100d7 patch.
Comment #17
jhodgdonLooks good, and I have also verfied it works this way in 7 (as in 8). Thanks for the patch!
Comment #18
jhodgdonThanks again all! Committed to 7.x.