Scenario:
Drupal 5.2
CCK 5.x-1.6-1
Token 5.x-1.8
Automatic Nodetitles 5.x-1.x-dev

One CCK field of a content type is a number. Nodetitles should contain this number. When i use CCK widget "text field" the node title is created correctly. When i choose "select list" it doesn't work (part of title is left blank). Thats the only difference.
Maybe this should be filed at token or cck issues, please correct me if wrong.

Comments

fago’s picture

hm, can you verify if token generation works with a cleanly loaded node?
e.g. you could install workflow-ng and output the token on node view with a message.

mooffie’s picture

Status: Active » Postponed (maintainer needs more info)

I've been experimenting with CCK's select lists and their tokens do work for me. I've tried both Number and Text fields. both *-raw and *-formatted. Both new and existing nodes.

Could you please check the 'weight' of this module in your {system} table? It should be '5'. And try to disbale all modules you can and see if it solved the problem.

Interestingly, another user has complained select list tokens don't work for him:
http://drupal.org/node/214428#comment-721975

I don't have time to investigate what module versions I'm using, so here are my version strings:

Drupal 5.2
$Id: token_cck.inc,v 1.1.2.9 2007/10/16 14:37:59 greggles Exp $
$Id: auto_nodetitle.install,v 1.1.2.1 2007/02/13 13:28:14 fago Exp $
$Id: optionwidgets.module,v 1.10.2.9 2007/08/09 19:03:52 yched Exp $

mooffie’s picture

Interestingly, another user has complained select list tokens don't work for him:

It turns out the other user made a little mistake and everything's actually fine.

So now we have at least two users who report they have no problems with selectboxes.

I'll mark this 'needs info'.

rokr’s picture

This issue was filed while trying best practises on one of my (now outdatet) demo systems.
With a newer version everything works fine. Today i made it back to the old test system to reproduce the error.
My nodetitle pattern for title looks like this:
Node [nid] - [field_jahr2-raw]
Where field_jahr2 is a cck field, type integer and widget is select list.

When i edit a node the title results in something like this: "Node 66 -"

fago mentioned above:

hm, can you verify if token generation works with a cleanly loaded node?
e.g. you could install workflow-ng and output the token on node view with a message.

Thanks for this hint - very usefull. The message i created when viewing a node:

raw [node:field_jahr2-raw]
formatted [node:field_jahr2-formatted]

This results in a message "raw 2000 formatted 2000" as expected when value is 2000.

mooffie suggests:

Could you please check the 'weight' of this module in your {system} table? It should be '5'.

The weight of auto_nodetitle was set to 1. I manually set it to 5. A short test (editing a node) resulted that it works now as expected. The field has been added to the node title. I hope this information is usefull for you and module weight will be set correctly from now on.
Thanks for checking this issue.

mooffie’s picture

weight of auto_nodetitle was set to 1. I manually set it to 5 [...] it works now as expected.

For things to work correctly with selectboxes, auto_nodetitle needs to run after CCK.

But, if its weight was '1', as you say, then that was the case already --because CCK's weight is '0'.

Strange. What modules do you have whose weight is between 1 to 5 (exclusive) ?

mooffie’s picture

Oops. I mean: "between 1 to 5, inclusive"

rokr’s picture

What modules do you have whose weight is between 1 to 5 (inclusive)

I'm afraid this will not make you happy since this list is huge while i was trying several modules.

Module Name with weight as number (modules with weight >= 1 and <= 5):

acidfree	1
autolocale	1
basicevent	1
block	1
color	1
comment	1
content	1
content_copy	1
date	1
date_api	1
dhtml_menu	1
event	1
event_all_day	1
event_views	1
fieldgroup	1
filter	1
help	1
image	1
image_gallery	1
imagefield	1
link	1
locale	1
mail_edit	1
menu	1
node	1
nodefamily	1
nodeprofile	1
nodeprofile_bonus	1
nodereference	1
number	1
optionwidgets	1
path	1
pathauto	1
privatemsg	1
profile	1
statistics	1
subform_element	1
subscriptions	1
system	1
taxonomy	1
text	1
themesettingsapi	1
token	1
tracker	1
update_status	1
user	1
user_relationship_defaults	1
user_relationship_invites	1
user_relationship_mailer	1
user_relationships	1
usernode	1
userplus	1
userreference	1
views	1
views_bonus_grid	1
views_rss	1
views_theme_wizard	1
views_ui	1
watchdog	1
auto_nodetitle	5
mooffie’s picture

Category: bug » support
Status: Postponed (maintainer needs more info) » Fixed

Oh! Something very wrong happened in your system. Something that reset all modules to have weight '1'. You're bound to encounter some problems in that system.

But now we finaly solved the mystery. Since your CCK (it's the 'content' line) has the weight '1' it was running after auto_nodetitle.

I'm marking this issue 'fixed'.

This issue was filed while trying best practises on one of my (now outdatet) demo systems.

Oh, it's only a demo site. So just scrap it.

BTW, to fix that system you need to set all module weights to '0' and then run the command...

grep -R '{system}.*weight' *

...to find out the correct weight to set for some modules.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.