Node Body displays improperly

jdblank - March 25, 2009 - 17:05
Project:Views Datasource
Version:6.x-1.0-alpha2
Component:Code
Category:bug report
Priority:critical
Assigned:allisterbeharry
Status:closed
Description

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.

#1

allisterbeharry - April 15, 2009 - 04:27
Assigned to:Anonymous» allisterbeharry

Could you post the text that is being output?

#2

kiamlaluno - April 15, 2009 - 04:53

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

jdblank - April 16, 2009 - 18:25

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

allisterbeharry - April 17, 2009 - 20:25

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

allisterbeharry - October 8, 2009 - 13:44
Status:active» fixed

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

#6

System Message - October 22, 2009 - 13:50
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.