I am setting up a view that contains the full node text and the attached file for the related node. However, using the default settings, the output is of the following form (for a test upload called "test.pdf")

This is a test (and other node text)

Attached Files: t

When I select "Link this field to download the file," the first character t is replaced by <.

Does anyone have any ideas why my output is being truncated to a single character?

Thank you

Comments

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

Could you make the simpliest possible view to reproduce it?

I fear to know the problem

kldehoff’s picture

This should show all attached files on published nodes

$view = new view;
$view->name = 'test';
$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', 'Defaults', 'default');
$handler->override_option('fields', array(
  'upload_fid' => array(
    'label' => 'Attached files',
    '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' => 1,
    'empty_zero' => 0,
    'type' => 'separator',
    'separator' => ', ',
    'link_to_file' => 0,
    'only_listed' => 0,
    'exclude' => 0,
    'id' => 'upload_fid',
    'table' => 'node',
    'field' => 'upload_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',
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('cache', array(
  'type' => 'none',
));
dawehner’s picture

I tryed it both with views 2.11 and views 3.x and it works perfect.

I tested both once with a single file and multiple files.

Do you have any kind of theming for this field? Or do you have any kind of other special modules on your site?

kldehoff’s picture

Found the problem.

Filefield: File Aliases doesn't play nice with the Upload portion of views.

dawehner’s picture

Project: Views (for Drupal 7) » FileField
Version: 6.x-2.11 » 6.x-3.x-dev
Component: files/upload data » Code

So this is another project.

quicksketch’s picture

Filefield: File Aliases doesn't play nice with the Upload portion of views.

I'm not sure what this means. The above example works just fine as reported by dereine, what's needed to actually reproduce the problem?

quicksketch’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)