Hi there,

Awesome module!

I have just found that the text token replacement do not seem to work when I have a node that uses the default image I have assigned to the field image on the node. Please see attachments, I hope they clarify what I mean.

ImageCache Actions: 7.x-1.4+20-dev
Token: 7.x-1.5+4-dev
Drupal: 7.32

Thanks.

Adios,
Maria

Comments

MariaWebIdeas’s picture

StatusFileSize
new25.76 KB
MariaWebIdeas’s picture

StatusFileSize
new25.76 KB
new201.57 KB

!ell, I have messed up the attached files! Here they are again.

Adios,
Maria

dman’s picture

Hm yeah. The illustration does show what you mean - it would have taken a lot of words to get the terminology right otherwise :-)
screenshot
I guess that this is 'by design' in the current Drupal image field system.
When you assign a 'default' image, that means that every instance re-uses a reference to the same image with the same URL in all places.
It does not copy the identical image dozens or hundreds of times. That would be nuts.

And .. image styles only run through the process once per image, so your example can't come up with a different version of the same image each time.
One source image has only one derivative on one style at any one time.
(this is also why we can't have per-user watermarked images etc)

ALSO, due to internal magic, if we were to get a request for the 'default' original image - it would be near-impossible to figure which node thinks it owns that original image, and this is necessary to find the text that goes there. The short answer is "none of them", and the long answer is "potentially all of them". And, well, the cintext is lacking to resolve that - even if it *were* possible to re-save many many copies. (It's not)

Basically, I can't see how you would do this at all with the current field system. ... due to mechanics above the level of imagecache_actions.
Firstly, I would avoid what you are doing - a dummy image with a label on doesn't really add value.

But if it's totally neccessary, then you'll have to skip using image fields 'default value' and do something else. I would probably instead add a 'Rule' that:
"when Saving a node"
"if the image field is empty"
"then COPY in the default image to the image field, with a new filename".
That would be sufficient to make a large number of genuinely unique placeholder default file copies, and therefore produce genuinely unique labelled derivatives.
It's inefficient - but that's what you are asking for here.

fietserwin’s picture

Status: Active » Closed (works as designed)

I think that @dman explained it completely and correctly. We can't do anything about this.

MariaWebIdeas’s picture

Thanks so much for the detailed information @dman. I understand now.

And thanks for offering an alternative way by using rules. I will have a think about it and consider other css routes using the actual title for the node.

Really appreciated.
Adios.