Hi!

Excellent stuff on this services... I can hardly wait for the SOAP support.

I don't know if this is a Services related thing or if this is how Drupal parses nodes from the db, but...
Why doesn't the HTML for the node get passed? I tried putting a Only local images are allowed. tag into a node and then node.load that entry into Flash. The response does include the Only local images are allowed. tag... it gets stripped... or so it seems. Am I out to lunch? Flash can handle the html in a textfield.

Thoughts? Any ideas would be great!

Thanks,
Owen

Comments

jiv_e_old’s picture

Status: Fixed » Active

I have the same question!

I have an img tag on my node, but it isn't in the getView result. Is it somehow possible to get full HTML result?

Steven Merrill’s picture

I ran into a similar issue, and I fixed it by switching my default input format to "Full HTML" from "Filtered HTML."

It would appear that services, or even maybe services_node_load is not respecting input format selection when loading nodes.

Steven Merrill’s picture

Well, it looks like services_node_load is doing the right thing, at least with a quick peek into the code:

services.module, lines 471 - 475:

  // apply filters to fields
  $body = $node->body;
  $node->body = new StdClass();
  $node->body_value = $body;
  $node->body = check_markup($body, $node->filter, FALSE);

Assuming $node->filter is being set properly, this should work, as the third parameter, $check, is being set to FALSE, so it should use the node's specified filter regardless of permission to set that filter.

robloach’s picture

Status: Active » Fixed

Correct, use the "body_value" return from Services instead of "body" if you want just the straight $body. Having $check set to TRUE will result in having the filter use the filter assigned to the current user (anonymous), so we set it to FALSE, so that it uses the node's filter.

jiv_e_old’s picture

Status: Active » Fixed

Thanks guys!!!

Using "body_value" worked great. I have to investigate this result object a little bit more.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.