Automatic nodetitle problem

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
Hazlitt's picture

I have run into a problem with the automatic nodetitle module which I have researched and failed to solve.

No matter what I set the 'Pattern for the title' to when I enable 'Automatically generate the title and hide the title field' it always sets the title of the node to 'ant'

Here is a related post http://drupal.org/node/413678#comment-1451786

If anyone has any ideas on how to solve this I would be really grateful.

Hazlitt

Comments

Works for me...

stevepurkiss's picture

Hi Hazlitt,

Just downloaded the auto_nodetitle module and put it on my local test install of acquia and the snippet of code he used in that example works fine for me. I checked the use PHP code, hide title, etc.

If all your modules are up-to-date then I can only think that it's either a conflicting module, which you can eliminate by trying on a blank install, or something to do with your server setup. I often find problems which occur on local may not occur on live. So check PHP/MySQL versions etc.

Apart from that no idea I'm afraid mate!

Still having the same problem

Hazlitt's picture

Thanks for testing it Steve.

I can't make it work. It seems to be ignoring the snippet. I am trying to reference CCK fields in the snippet so maybe that is the problem. I will try and make more time for testing. I guess it may be clashing with pathauto somehow.

Referencing a CCK field

stevepurkiss's picture

As I spoke to Hazlitt IRL at the Farm freelancers meeting last night I thought it might be helpful for reference just to post up part of the problem here.

When referencing a CCK field, you need to do it as follows - here's an example for a field called 'product id':

$node->field_product_id[0]['value']

...rather than $node->field_product_id which is what most probably think it is to start with.

The problem is still occurring though so that was only one part of it, we think module versions may be the issue....

The solution

Hazlitt's picture

..was to download and install the previous version of the module which works fine. All I have to do now is ignore the message that keeps telling me to upgrade this module..!

or you could cheat ;)

stevepurkiss's picture

Changing the version number in the module .info file would be nasty and I wouldn't recommend it, but y'know, just sayin' ;)