Hi,

i don't know how this came up but it happend as a result of some setting or the upgrade from 1.x to 2.x-dev.

i have a node type called "benutzerprofile" which's alias looks like "benutzerprofil/[title]". The node is a profile node with automatic title generation. The Author's name is taken as node title which always worked well and still does. Suddenly Pathauto started to alias every benutzerprofile-node with "ant" instead of the node's title (which is still okay -> the author's name).

so since then aliases look like benutzerprofile/ant, .../ant-0, .../ant-1 .... , .../ant-27 and so on.

any idea where this could come from?

Comments

greggles’s picture

Status: Active » Needs work

This is really curious. all I can think of is ant = "Auto Node Title" ?

Which led me to find:

      // we will autogenerate the title later, just hide the title field in the meanwhile
      $form['title']['#value'] = 'ant';
      $form['title']['#type'] = 'value';
      $form['title']['#required'] = FALSE;

So, can you try modifying the module weight to 6? You can base doing that on this patch: http://drupal.org/node/158281

I only say 6 instead of 1 because the autonodetitle module is already a weight of 5.

I'm marking this "patch (code needs work)" since we've got an idea and if that works then this issue will be a duplicate of that other one which I'll then have to work on.

fhelmschrott’s picture

i don't know how to set the module weight manually. The module for that didn't work on last try. Can you point me to any documents describing that or just tell me how to?

greggles’s picture

Title: "ant" instead of [title] » "ant" instead of [title] when using auto node title

Changing the title to be a bit more descriptive.

To change the weight manually, edit the "system" database table which has a "weight" column so that the weight for the pathauto row is 6.

fhelmschrott’s picture

after patching it to 1 with the other patch (didn't change anything to this issue) i tried setting it to 6 via the db but this also didn't change anything.

still the "ant" problem.

greggles’s picture

Status: Needs work » Reviewed & tested by the community

I just committed a fix for this (hopefully) which fago pointed out - token caches the values, so if we just use the values from token then it won't matter what the weight is as long as we use the cached values. I'm explaining that badly, but the point is that I just committed a fix which should make this work. If you get a copy of the download tomorrow then it should be fixed. The change is just to add "TRUE" as the third parameter on line 560 of pathauto.module:

$full = token_get_values($type, $object, TRUE);

greggles’s picture

Status: Reviewed & tested by the community » Fixed

whoops - wrong status on the last one...

Anonymous’s picture

Status: Fixed » Closed (fixed)
esmailzadeh’s picture

not fixed not closed

greggles’s picture

Category: support » bug
Status: Closed (fixed) » Active

@esmailzadeh - thanks for your update.

Can you explain what steps you followed and what happens?

greggles’s picture

Status: Active » Postponed (maintainer needs more info)
esmailzadeh’s picture

i install node auto title (5 2 2) and then active this module with a content type then i fill auto title field with a token like: [link_field_title] then i add a node then i see ant instead of title of node

greggles’s picture

@esmailzadeh - which version of Pathauto are you using?

greggles’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

2 weeks without response -> closing.

gagarine’s picture

#738466: Generate node.title on validate step as well (not only on presave) The bug is certainly more on the auto node title side...