In my CCK type, I have an image field setup that uses the token [title-raw], and also allows for custom text.

If I browse for an image and then save the node, the token gets replaced.

If I browse for an image and select 'Upload' before saving the node, the token doesn't get replaced, just appears as [title-raw].

The tokens don't get replaced even if the node has been previously saved.

------------------------------
Drupal 6.13
FileField 3.1
ImageField 3.1
ImageField Tokens 3.1

Comments

quicksketch’s picture

Project: ImageField » ImageField Tokens
Version: 6.x-3.1 » 6.x-1.x-dev

The "title-raw" token is provided by the ImageField Tokens module, not FileField/ImageField.

ngstigator’s picture

If I disable custom alt text, then the alt tag gets populated from assigned token when the node is saved.

locomo’s picture

I'm experiencing this too, specifically on a node type that is automatically created by the feeds module. The workaround in #2 works for me too (disable custom alt text).

Definitely seems like a bug.

lpalgarvio’s picture

usually when the tokens don't get replaced, the work around is to re-edit the node and type again the tokens. next time you view it they will be replaced with the value.

scottbrown_14’s picture

@LPCA. Your fix works for me but I've got around 3000 nodes that I need to update. Is there no way of getting around this?

lpalgarvio’s picture

well i didn't coded the module... someone who understands it likely can provide a fix.

scottbrown_14’s picture

I know you didn't, thanks for the response though.

I was just wondering if you'd found a nice, bulk-job way around it. Hopefully someone else has.

Another question for someone who may know the answer: Will new nodes imported with node_import automatically have the tokens applied correctly?

thaistore’s picture

I just installed latest dev versions

nothing happens, do I need to flush images? I use image cache like most of us are

I cant edit each node, i have over 1000 nodes

13rac1’s picture

Status: Needs work » Closed (works as designed)

Here is a D5/D6 method to resave all nodes: http://www.templatezine.com/2010/06/drupal-re-save-all-site-nodes/
Closing old issue.