Does not see term-raw first time
gettysburger - May 29, 2009 - 15:43
| Project: | Automatic Nodetitles |
| Version: | 6.x-1.1 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Description
I am having titles generated when the title field is empty. I am using:
[term-raw] vs. [field_opponent-raw]
When I first save the node, the title is " vs. Cecil County"
If I then delete this title and save again I get the correct "Women's Basketball vs. Cecil County"
Any thoughts? Thanks.

#1
The attached patch resolved the problem for me. However, it is somewhat of a hack, as the root cause of this lies further down the token module chain.
#2
Thanx for the patch, but there is an error.
Instead of
+ foreach ($node->taxonomy as $tid => &$term) {
+ $term = taxonomy_get_term($tid);
Shoould be
+ foreach ($node->taxonomy as $count => &$term) {
+ $term = taxonomy_get_term($term);
#3
I have this problem using the formatted [term] value as well, should that make any difference. Looks more to be a token/taxonomy issue.
#4
This patch doesn't appear to work quite right. It will add a term to the title, but it's not the term that I applied to the node... it's not even a term in the same Vocabulary. I tried it with the change posted by lancelot, and the patch ceased to have any effect whatsoever.
#5
EPIC FAIL:)
This patch converts (int) $term to (obj) $term… Vocabularies' fields become blank:) when node edit form refreshes e.g. on preview or on form validation error. It seem like core Token bug, not ANT.
Try this #338853: Token malfunction with Auto NodeTitle: [term] replacement fix patch — works for me:
D6.13
CCK 2.4
Views 2.6
#6
a.a.egoroff, that patch did the trick! Thanks!
#7
#338853: Token malfunction with Auto NodeTitle: [term] replacement fix patch works for me as well.