Closed (fixed)
Project:
Computed Field
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
7 Feb 2009 at 23:41 UTC
Updated:
27 Nov 2012 at 23:13 UTC
Jump to comment: Most recent
Comments
Comment #1
asb commentedHow do you get the computed field's value into the node title? In my setup, computed field does not expose it's values as token, so there's no replacement pattern I could enter for automatic title generation.
Thanks & greetings,
-asb
Comment #2
clarkburbidge commentedAll my cck fields are available as tokens. I don't know what I did to get it that way. I thought that was standard.
Comment #3
Moonshine commentedWhile this response may be too late for you, I think your problem may be related to this:
#414088: Computed fields should compute on $op='presave' and/or $op='validate'
while I'll be looking into here...
Comment #4
clarkburbidge commentedThis is still and issue for me. I'm not sure if 'presave" would fix the issue. Currently I have a views bulk operation that I run occasionally to band aid the issue. I'd love to see it fixed, but I think it is more the way I have it set up with a nested computed CCK fields as one of the tokens for my auto node title. Thanks for info and I'll be following the results!
Comment #5
csc4 commentedI'm sure you're right - the computation has to happen before the value is tokenised or the value can't be available.
I'd been thinking it was simply an issue with module weights?
I've been struggling with the same problem. Is it as simple as patching the module to change the operation to presave or are there other considerations?
Comment #6
TripleEmcoder commentedSubscribing.
Comment #7
KerriO commentedSubscribing
Comment #8
millenniumtreeAghghh! Yes!
Comment #9
brycesenz commentedSubscribing.
Comment #10
Anonymous (not verified) commentedSubscribe
Comment #11
Moonshine commentedThis should be fixed per #414088: Computed fields should compute on $op='presave' and/or $op='validate'
Comment #13
texas-bronius commentedFor anyone stumbling across this.. I found a win in passing a value in the $node (auto_nodetitle) and $entity (computed_field) objects like:
Auto Node Title config on content type using PHP eval:
(include php tags)
Computed Field config:
(omit php tags)
Bonus tucked in, so here's what all is going on:
The added bonus here is that my computed field does *not* update with each node save (desired behavior in my use case). The overall take-away here is that auto_nodetitle has access to and can modify $node and fires before computed_field which has access to and can modify $entity. Note: You can always debug with dsm($node) and dsm($entity) in the respective eval blocks with the devel module.
Appears to work for me thus far... hth