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
Comment #1
fagohm, 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.
Comment #2
mooffie commentedI'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 $
Comment #3
mooffie commentedIt 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'.
Comment #4
rokrThis 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:
Thanks for this hint - very usefull. The message i created when viewing a node:
This results in a message "raw 2000 formatted 2000" as expected when value is 2000.
mooffie suggests:
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.
Comment #5
mooffie commentedFor 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) ?
Comment #6
mooffie commentedOops. I mean: "between 1 to 5, inclusive"
Comment #7
rokrI'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):
Comment #8
mooffie commentedOh! 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'.
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...
...to find out the correct weight to set for some modules.
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.