Closed (fixed)
Project:
FileField
Version:
6.x-3.0-beta3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
29 Feb 2008 at 17:36 UTC
Updated:
8 Apr 2009 at 21:20 UTC
Jump to comment: Most recent file
The code defines several tokens for data related to FileField uploads (file name, mime type, etc.), but no token exists for the file description field. Instead, there is a token defined for file title, data that does not exist in FileField. When I attempted to use the file-title token in the Auto Node Title it was blank even though there was a description filled in for the file.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | filefield_228466_2.patch | 1018 bytes | scottrigby |
| #1 | filefield-228466-1.patch | 1.16 KB | tomboone |
Comments
Comment #1
tomboone commentedReplacing 'title' with 'description' in token functions appears to fix the problem.
Comment #2
jpetso commentedMakes sense. I committed this to CVS (DRUPAL-5--2 branch), should work in the next release.
Thanks for the patch (and the bug report in the first place)!
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #4
scottrigbyThe same issue seems to be happening with FileField 6.x-3.0-beta3 (& Automatic Nodetitles 6.x-1.1).
Patch against beta3.
In filefield_token.module, on line 32
$tokens['filefield-description'] = isset($item['description']) ? $item['description'] : '';should be:
$tokens['filefield-description'] = isset($item['data']['description']) ? $item['data']['description'] : '';because the $item array looks like this:
Comment #5
quicksketchThanks scottrigby, you're very right. This seems to have been an issue ever since the 3.x branch of the module which introduced the "data" serialized column. Committed. Thanks!