I will start off with the quaification that I am a newbie...

I am a content type call Headwear Products that has Image Attach enabled as well as a CCK field using the FileField Module (filefield-6.x-3.0-alpha3).

Using Views2 and Views Datasource I am trying to create an XML doc that displays the path to the Image Attach file as well as the FileField image I have attached. They are both showing up correctly when I view in a non-XML format.

The rendered XML looks like this:





1498
1497
headwear_products
5453
1


a:1:{s:11:"description";s:0:"";}

1498

In the place of the Image Attach field I get a VID field and in place of the FileField field I am getting three elements that do not include the path.

Here is the exported View:

$view = new view;
$view->name = 'flash_test';
$view->description = 'flash_test';
$view->tag = 'flash';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
'nid' => array(
'label' => 'Nid',
'link_to_node' => 0,
'exclude' => 0,
'id' => 'nid',
'table' => 'node',
'field' => 'nid',
'relationship' => 'none',
),
'iid' => array(
'label' => 'Attached Image',
'size' => '_original',
'as_link' => 'node',
'exclude' => 0,
'id' => 'iid',
'table' => 'image_attach',
'field' => 'iid',
'relationship' => 'none',
),
'field_testfield_fid' => array(
'label' => '',
'link_to_node' => 0,
'label_type' => 'widget',
'format' => 'url_plain',
'multiple' => array(
'group' => 0,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => 0,
),
'exclude' => 0,
'id' => 'field_testfield_fid',
'table' => 'node_data_field_testfield',
'field' => 'field_testfield_fid',
'relationship' => 'none',
),
));
$handler->override_option('filters', array(
'status' => array(
'operator' => '=',
'value' => 1,
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'type' => array(
'operator' => 'in',
'value' => array(
'headwear_products' => 'headwear_products',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
'role' => array(),
'perm' => '',
));
$handler->override_option('items_per_page', 100);
$handler->override_option('style_plugin', 'views_xml');
$handler->override_option('style_options', array(
'schema' => 'raw',
));
$handler->override_option('row_plugin', 'unformatted');
$handler->override_option('row_options', array(
'separator' => '|',
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'flash_test');
$handler->override_option('menu', array(
'type' => 'none',
'title' => '',
'weight' => 0,
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'weight' => 0,
));

Please forgive is this post is in the wrong area. This is my second time attempting to post from help.

Thank you for any insight

Comments

stdbrouw’s picture

It's an alpha, so I wouldn't advise you to use it at all. I've experienced other problems myself, e.g. it sometimes displays the wrong tag for a field.

RemyAroundTown’s picture

I am having a similar issue when using an ImageField set to display as a URL. Other fields are being processed just fine, but the photo link is showing up as:

a:0:{}

justinlevi’s picture

This can be solved by adding a relationship.

http://drupal.org/node/449904#comment-1557372

allisterbeharry’s picture

Assigned: Unassigned » allisterbeharry
Status: Active » Fixed

All issues with displaying single or multiple images URLs should be resolved in 6.x-1.0-beta1

Status: Fixed » Closed (fixed)

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