Hi,

I noticed a bug with filefield description, this bug appear in all non full node page.

When you want to print a filefield, in a node teaser, or a view, the field description = "a".

The cause of that problem is that the $field['data'] is serialized on non full node page, to reproduce and print the problem, just do that :

in the file filefield_formatter.inc

in the function theme_filefield_file

Just add this line in the first line of the function :

drupal_set_message('<pre>'.print_r($file, true).'</pre>');

You will notice that on the full node view, we have a non serialied $file['data']['description'] field, and on the non full node view we have a serialied $file['data'];

This is the origin of the problem, but, unfortunately, I don't know the best solution to fix it.

Comments

corneverbruggen’s picture

subscribing

awolfey’s picture

subscribe

dopry’s picture

this should be fixed now... description is no longer used.

dopry’s picture

Status: Active » Fixed

this should be fixed now... description is no longer used.

Status: Fixed » Closed (fixed)

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

gunzip’s picture

Version: 6.x-3.0-alpha4 » 6.x-3.0-beta3

bump. i have the same problem with the latest beta 6.x-3.0-beta3.
it looks like when i output the file with 'generic files' formatter in a view, here:

  if (empty($file['data']['description'])) {
    $link_text = $file['filename'];
  }

$file['data'] is serialized and not an array so i get only the letter 'a' as the link_text.

gunzip’s picture

Status: Closed (fixed) » Active
surgeonbor’s picture

subscribing

quicksketch’s picture

gunzip, are you experiencing this problem when displaying FileFields in Views, but not in the normal node view (teaser or full versions)? If so, this problem has been fixed in the ImageField queue: #299329: No display of alt or title with images - Simple Workaround

gunzip’s picture

Status: Active » Closed (duplicate)