i use a view to generate xml output containing two fields
- a path to an image
- a path to a node
both pathes are required to be relative but while the image path is "files/images/..." the node path has a trailing slash "/path_to_node".
I think pathes everywhere in drupal don't have a trailing slash- i read another post that the path might be sent through url() that might add the slash but is that really by design?

Comments

iamjon’s picture

Status: Active » Postponed (maintainer needs more info)

thommyboy,
did you ever figure this out? if yes please update so others can benefit.
if not please provide an export of your view and provide step by step duplication instructions using simple content types and fields.

thommyboy’s picture

i solved it with a fieldtemplate but the problem is still there. just do a contenttype "mytest" and add one cck file field named "cck_image". add one node and call teh following view. the view displays a path to the uploaded image (no trailing slash) and a "node: path" field (trailing slash). i think as this nodepath is aliased it's send through a function that results in this trailing slash...

$view = new view;
$view->name = 'mytest';
$view->description = '';
$view->tag = '';
$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', 'Standards', 'default');
$handler->override_option('fields', array(
'field_cck_image_fid' => array(
'label' => 'image',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 0,
'label_type' => 'widget',
'format' => 'path_plain',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_cck_image_fid',
'table' => 'node_data_field_cck_image',
'field' => 'field_cck_image_fid',
'relationship' => 'none',
),
'path' => array(
'label' => 'node path',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'absolute' => 0,
'exclude' => 0,
'id' => 'path',
'table' => 'node',
'field' => 'path',
'relationship' => 'none',
),
));
$handler->override_option('filters', array(
'type' => array(
'operator' => 'in',
'value' => array(
'mytest' => 'mytest',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('cache', array(
'type' => 'none',
));

iamjon’s picture

Status: Postponed (maintainer needs more info) » Active

Changing status.

MustangGB’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)