I have set up everything as instructed: latest dev version of deploy on staging + latest services 2.x on production.
The deployment worked, but the new nodes and node updates are being deployed with their body html tags modified.
For example:

<p>Hello world</p>

deploys as:

pHello world/p

If body contains no html tags, it deploys properly.

I am not sure whether this issue needs to be raised here or in Services module.
Is there a fix for this bug?

Thanks,
Mukhsim.

CommentFileSizeAuthor
#2 phpinfo.txt66.93 KBmukhsim

Comments

gdd’s picture

Category: bug » support
Priority: Critical » Normal

I haven't seen this, either on the Services side or on the Deploy side. I have done a lot of deployments using HTML text and they have all been successful. One thing you should do is check is your filter settings.

mukhsim’s picture

StatusFileSize
new66.93 KB

I performed a clean install of Drupal 6.16 and installed Deploy module (from March 12, 2010) and Services module (from March 4, 2010) as instructed in INSTALL.txt.

I am still experiencing the same issue.

My settings are: Apache/2.2.11 (Unix) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8k PHP/5.2.9 mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0

Attached is my phpinfo as text file, it can be renamed to phpinfo.html in order to be viewed.

Could it be an issue with latest Services module?

Mukhsim.

mukhsim’s picture

Tried on another server and everything worked.
Seems like issue has something to do with server configuration.

Mukhsim.

teastburn85’s picture

I am also getting this issue on my local machine (Ubuntu/PHP 5.3.2 from dotdeb.org/libxml2 2.6.32) and I feel like a few weeks ago I didn't get it at all, but now I can't get it to stop. It is not happening on our other boxes (CentOS/PHP 5.3.2/libxml2 2.6.26), though. If I figure out why I'll post it back up here.

My temporary hack was to put the data in string elements into CDATA sections in xmlrpc.inc on line 104 and remove the htmlspecialchars call.

It seems as though the configuration of the XML Parser PHP library has something to do with it. While it's parsing it reads the entities inside the string as separators of some sort, so it calls the xmlrpc_message_cdata function with some data but then calls the xmlrpc_message_tag_open and xmlrpc_message_tag_close functions with the tag name, without the entities. Putting strings in a CDATA section gets around this nicely, but I'm sure there are cases where not all strings should be in CDATA sections.

@mukhsim What was the configuration for the server that worked? Which version of libxml2 does it have?

iamjon’s picture

I'm having the same problem. on Drupal 6.17 php5.2.9 on freebsd

iamjon’s picture

@heyrocker: Please let me know what I should check filter settings for or what the defaults should be? Is there any more info I can provide to help debug?

@teastburn85: When it is processed via your hack does is the output wrapped in CDATA or does the output simply restore the html?

Thank you so much

iamjon’s picture

Update
As I try to narrow down what is causing the html to be filtered, the input filters were set to full html on both sites. I switched the target site to plain text to see if that would change the behavior of the import but the error remained.

iamjon’s picture

Ok so following my conversation with Heyrocker and a bit of debugging/random google-ing I ran into this post:
http://drupal.org/node/371884

I followed the directions and added

$message =str_replace("&lt;","&#60;",$message );
  $message =str_replace("&gt;","&#62;",$message );
  $message =str_replace("&amp;","&#38;",$message );
  $xmlrpc_message->message = $message;

To line 146 of xmlrpc.inc.
But it's a core hack and there is no way that is a good thing. I would like to know if anyone knows of which hook I can use to override
function xmlrpc_message($message){}

paladino’s picture

I had the same issue. Followed the suggestions of this thread: http://drupal.org/node/578470

Turned out is was drupal_http_request() not setting an $result->code. I thought this patch was committed to the D 6.17 release? Are you current?

paladino’s picture

disregard. i see you are current.

teastburn85’s picture

@iamjon Sorry for the late reply, I haven't looked at this in a while. I believe the string gets passed through services with CDATA section intact, then maybe the filter removes it when you try to edit? Either way, in FCKEditor and regular full HTML the content shows up fine without CDATA section on remote server.

dixon_’s picture

As we are dealing with two different Drupal sites (source and target) the input format settings needs to be completely in sync with each other. This becomes even more important since filter formats is referred to by it's id which may for several reasons not be in sync (new, removed or recreated).

Can you please make sure the input format id's are in sync on both sites? Do this by hovering the "configure" link on admin/settings/filters and inspect the URL of that link.

iamjon’s picture

Hi dixon_ I don't know to if you were referring to me or not, but one of the first things I checked was that input formats are the same.
I think it's a php thing. We are on 5.29.

Best regards

dixon_’s picture

Status: Active » Closed (won't fix)

As this thread http://drupal.org/node/371884 states, there seems to be a bug in the libXML version you are using. Nodes with full HTML content does work fine under normal circumstances.

Marking this as won't fix as it's nothing that this module can solve.