Hi there,

I would like to have the description of a filefield shown in the node, instead of the filename.

Any help is appreciated!

Thanks!

Comments

cmurockstar’s picture

I am having a similar situation
Using Drupal 6

mortenson’s picture

Coul you explain more please

nonrate’s picture

I am also experiencing this problem.

What the user is asking is exactly what he wants --to see the description instead of the filename listed when presented from the $content global. Here's what's happening on my Drupal 6.x, using filefield-6.x-3.0-alpha5:

1) I upload a file when creating a new page/node successfully
2) I add the description
3) I save the node
4) I view the page and the file displays as expected, but not with the description name, but the filename
5) I edit the node to see if I filled out my description properly, or at all
6) Golly gee willicures, I forgot to fill out my description, because it's empty! So I fill it out again. To make sure to validate my sanity this time, I upload a second file and give it a description as well.
7) I save the node again
8) I view the node... wait... file names again!
9) I edit the node again. Shucks darn it, what have I been smoking? The descriptions for both files are not there again!

This version of the module is either not saving the descriptions to the database, not properly getting the descriptions to the module to save to the database, or are not being called from the database properly. Or some other issue entirely different. But the descriptions for the files are behaving as if they are not being saved, or ignored as provided.

Printing out the entire content of the node object itself shows the filefield data, but the description field is missing in that as well.

I tried traversing through the tables to find where this description is being stored. I will not pretend to understand both Drupal's content database architecture completely, nor how the filefield module is storing this data completely. I have reversed engineered it somewhat so I can pull the files related to the nodes, get the filename info, the path, but can't track down where the description data is being stored, if it is at all.

I figure perhaps since this is an Alpha release, the descriptions have not been implemented yet. Either that, or perhaps it's the subversion of Drupal we're on that's causing the issue, or if the module is extending any part of CCK, the CCK version being used. At any rate, this is the symptom. Good luck with tracking down the issue, post if you need more info about my configuration to help you.

SD

Screenack’s picture

+1 subscribe

jfulton’s picture

subscribe

k3vin’s picture

subscribe

quotientix’s picture

The error seems to be fixed in the latest release.
File description field saves correctly and the node is showing the correct description.

Hooray!