The Devel Module Observation Effect
The Devel module is such an indispensable part of any Drupal developer's toolkit that it's easy to forget that it does sometimes tinker with Drupal at a fairly low level. I was getting a perplexing error from an XML-RPC service I was developing as part of a Drupal module. I had written a simple testing client in Python and it was choking on the server's response, giving me the following error: xml.parsers.expat.ExpatError: junk after document element: line 11, column 0
While trying to track down the cause of the error I went so far as to temporarily hack the xmlrpc_server_output() function to dump the server response to an XML file on my hard drive. There was absolutely no junk in the document at line 11 or anywhere else, and it was at that point that it occurred to me to wonder if the Devel module might be adding something spurious to Drupal's output along the way. Sure enough, upon disabling Devel my XML-RPC method worked as expected. I'm not sure what the problem was, but in the future I'll try to remember to eliminate Devel as a culprit for unexpected behavior early on in the debugging process.
Tags: DrupalDebuggingDevel Modulexmlrpc
-
var switchTo5x=true;stLight.options({publisher:'dr-8d4fe24c-a8ab-ba90-8086-3791b02244be'});