In a CCK Filefield with multiple uploads within the same field, when creating a filepath and renaming files using the filefield-description token, the description of the first token is used to rename all files- thus creating the same name for all files.

Not sure if this is a token issue or an issue with filefield not passing the right data. Essentially, the file should take the data from the description field next/associated to it, and not that of the first upload only.

Comments

quicksketch’s picture

Project: FileField » File (Field) Paths
Version: 6.x-3.7 » 6.x-1.4

FileField does not allow you to rename files based on description, my guess is this is an issue for FileField Paths.

pomliane’s picture

Subscribing.

bariew’s picture

[field_files-filefield-description] - takes only first value, but
[filefield-description] - takes each of them

pomliane’s picture

Version: 6.x-1.4 » 6.x-1.x-dev
deciphered’s picture

Status: Active » Postponed (maintainer needs more info)

What bariew said ^.
Although, Careless' description implies he used the latter not the former, in which case it would be correct.

Can I get confirmation that what bariew said is working correctly in the altest dev?

Cheers,
Deciphered.

 

@quicksketch, maybe you can put a message at the top of the FileField create issue form stating something like: If your issue is related to Node or Field tokens, there is a good chance it belongs in the File (Field) Paths issue queue, not here.

pomliane’s picture

Yes what bariew said is what happens in dev.
But:

  • Is this really the normal behaviour?
  • There is no raw value for [filefield-description] and, as is, at least in my different installations single quotes "'" are displayed as ' in ALT and TITLE attributes for images.

So, in the end neither [field_files-filefield-description] nor [filefield-description] are fully usable on mutliple fields—at least in my case and if I don't miss anything...

Cheers,
Pomliane

deciphered’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Yes it is expected behaviour:

- [field_files-filefield-description] is a Node token and as the Node can contain multiple values for that field but the Token module has no way of handling the multiple values it returns the first value.
- [filefield-description] is a Field token and a Field can only contain a single value, so it is the token you should be using in most cases.

In general File (Field) Paths is not a supplier of tokens, it's a consumer of Tokens, so if you have complaints about the token itself then that is a another issue with another module.

Cheers,
Deciphered.

pomliane’s picture

Thank you Deciphered for these explanations.

Now, I have to look for a related issue in FileField and hope it's the good queue. :)