Project:Views Datasource
Version:6.x-1.0-alpha2
Component:Code
Category:bug report
Priority:critical
Assigned:allisterbeharry
Status:closed (fixed)

Issue Summary

We created a content type with just the default node fields (title & body). The XML feed will not display the node body at all. The SQL is correct and when run against the database it pulls the node body but when run from the view with the XML type it displays a date instead of the body text (we are also using revisions).

Also we are using the zip file version from a previous thread.

Any help is much appreciated.

Comments

#1

Assigned to:Anonymous» allisterbeharry

Could you post the text that is being output?

#2

If you are using a version given from somebody else, you should not report the issue here. This issue queue should be used for code submitted from the maintainer(s).

#3

here is the text being output

<?xml version="1.0" encoding="UTF-8" ?> <!-- generator="Drupal Views_Datasource.Module" --> <nodes> <node> <nid>188</nid> <node_data_field_help_text_id_field_help_text>2009-04-16T02:58:52-0700</node_data_field_help_text_id_field_help_text> <node_type>help_text</node_type> <node_vid>2009-04-16T12:44:00-0700</node_vid> </node> </nodes>

#4

ok I think this issue is the same as the 'edge-case' - the body is being interpreted in a crazy way as a date. I have a patch against DRUPAL-6--1-0-ALPHA2 but I don't know if it will apply to the version skyredwang (try and see though.) I'm working on the ALPHA3 with all the accumulated bug fixes but in the meantime you should be able to fix this:
in views-view-xml.tpl.php inside the xml_raw_render function find and change:

      if (strtotime($value))
        $value = date(DATE_ISO8601, strtotime($value));

to

      if (preg_match('/\d/', $value)) {
        if (strtotime($value))
          $value = date(DATE_ISO8601, strtotime($value));
      }
AttachmentSize
patch.txt 1.06 KB

#5

Status:active» fixed

Fixed in alpha3: http://drupal.org/node/598242

#6

Status:fixed» closed (fixed)

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