Closed (duplicate)
Project:
Views (for Drupal 7)
Version:
5.x-1.6
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Dec 2007 at 00:49 UTC
Updated:
26 May 2008 at 17:13 UTC
I created a content type with CCK for uploading a document using the Filefield CCK module. In the view for displaying the node, I set as display fields the Title (not as a link), field_document (the field I created with CCK), and the Body. The problem is that the field_document field is displayed twice: once by itself as it should be, and once also in the Body field (along with the text in the Body field). It seems to me that since field_document is a separate field, it should not be displayed as part of the Body.
Here is an export of the view:
$view = new stdClass();
$view->name = 'member_documents';
$view->description = 'Docs available to all members';
$view->access = array (
0 => '3',
1 => '4',
);
$view->view_args_php = '';
$view->page = TRUE;
$view->page_title = 'Member Documents';
$view->page_header = '';
$view->page_header_format = '3';
$view->page_footer = '';
$view->page_footer_format = '3';
$view->page_empty = '';
$view->page_empty_format = '3';
$view->page_type = 'table';
$view->url = 'member_documents';
$view->use_pager = TRUE;
$view->nodes_per_page = '10';
$view->menu = TRUE;
$view->menu_title = '';
$view->menu_tab = FALSE;
$view->menu_tab_weight = '0';
$view->menu_tab_default = FALSE;
$view->menu_tab_default_parent = NULL;
$view->menu_tab_default_parent_type = 'normal';
$view->menu_parent_tab_weight = NULL;
$view->menu_parent_title = NULL;
$view->sort = array (
);
$view->argument = array (
);
$view->field = array (
array (
'tablename' => 'node',
'field' => 'title',
'label' => '',
'handler' => 'views_handler_field_nodelink',
'options' => 'nolink',
),
array (
'tablename' => 'node_data_field_document',
'field' => 'field_document_fid',
'label' => '',
'handler' => 'content_views_field_handler_group',
'options' => 'default',
),
array (
'tablename' => 'node',
'field' => 'body',
'label' => '',
'handler' => 'views_handler_field_body',
),
);
$view->filter = array (
array (
'tablename' => 'node',
'field' => 'status',
'operator' => '=',
'options' => '',
'value' => '1',
),
array (
'tablename' => 'node',
'field' => 'type',
'operator' => 'OR',
'options' => '',
'value' => array (
0 => 'document',
),
),
array (
'tablename' => 'term_node_6',
'field' => 'tid',
'operator' => 'AND',
'options' => '',
'value' => array (
0 => '25',
),
),
);
$view->exposed_filter = array (
);
$view->requires = array(node, node_data_field_document, term_node_6);
$views[$view->name] = $view;
Comments
Comment #1
catchThis sounds like a bug with filefield appending itself to the body rather than views. Could you either reassign this to that project or open a new bug report against it?
Comment #2
wonder95 commentedOK, I submitted it under FileField here.
Comment #3
sunMarking as duplicate of #254403: node:body field inserts entire node in view