Under D6.4, with auto_nodetitle dev for 6, I have got content_profile.module installed - a classic case for using auto node titles if ever there was one. The trouble is, I see no titles.

In the field for my content types auto generation, I have entered "Hello [some-token] [some-token]" but when I view the profile node, all I see is the "Hello ".

Any thoughts?

Comments

traviss359’s picture

I see the same issue with the 5.x-1.x-dev version. The production version (5.x-1.1) works with tokens just fine. I'm guessing something got messed up with the development snapshots.

niklp’s picture

Priority: Normal » Critical

Upgrading priority, because this simply does not work under D6 to the best of my knowledge and experience with it.

Stol’s picture

It works for node tokens but not for cck field tokens, I don't know for all cck fields but certainly not for node reference tokens.

niklp’s picture

So is this a problem with CCK or with tokens in general...?

Stol’s picture

Not with tokens in general, imo. It's with cck but I 'm not sure if all cck fields got this issue. Will do some tests this evening.

thepanz’s picture

I'm using 6.x-1.0 version.
I have the same issue after updating CCK and other modules to latest 6.x versions (CCK, Views2, ImageField, FileField..)
I noticed that Token weight is set to 10 and AutoNodeTitle is set to 5. Is it correct?

Regards

Stol’s picture

Status: Active » Postponed (maintainer needs more info)

Did some testing and more tests are needed. For CCK fields and date fields some tokens doesn't render like for example the token for the title field of node reference type doesn't render. Also the token for the formatted date view doesn't render. Other tokens of the node reference and date fields seems to render. Gonna make a list tonight with tokens that renders and the ones that don't (at least for the CCK fields I have installed).

thepanz’s picture

My issue regards an Integer CCK Field. I'm using a pattern also with [term] token: this one is rendered correctly

Stol’s picture

Tokens that are not rendered (by description) grouped by type:

date

The formatted date

node reference

Referenced node title
Formatted html link to the referenced node.

text

Formatted and filtered text

number

Formatted number value

It looks like all formatted values are not rendered, the raw format values does render!

fago’s picture

I suppose this is a token issue - have you checked the token issue queue?

niklp’s picture

I would actually guess that its more likely to be a token or CCK issue - in either case, it seems to have fixed itself for me for the moment.

Am monitoring as the dev updates progress on other modules (cck et al).

dagomar’s picture

I think this is a problem with auto_nodetitle. This module should process the tokens AFTER the node has been saved, only then all tokens will be available. So I have proposed in http://drupal.org/node/194197 to use nodeapi. The function I have written works for me, but it only processes NEW nodes. For nodes that need to be updated the whole function should be changed, because you can't use node_save for the $op 'update'; It would create an infinite loop. Best would be if the function would be rewritten to do this:

function auto_nodetitle_set_title(&$node) {
// if the title is empty, here should be set a temporary title
}
function auto_nodetitle_nodeapi(&$node, $op, $teaser, $page) {
// #1 checks for nodetype
// #2 creates the title in case of $op = 'insert' or 'update'
// #3 does a SQL-query to update the title field of the given node.
}
grobemo’s picture

The same problem cropped up for me.

I upgraded CCK to 6.x-2.0-rc8, and it fixed the problem, as far as I can tell.

fago’s picture

Title: No tokens rendered » cck tokens rendered
Status: Postponed (maintainer needs more info) » Fixed

fine, so let's close this one.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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