I'm using [catpath-raw] as a replacement pattern for term paths. When changing a term name, the term path is not updated after saving the term. When editing the term a second time and just pressing "save" without a change, the term path gets updated, however.

This can be easily reproduced using a clean D6.17 install, with pathauto and token as the only contributed modules, caching turned off, and without any content except of some terms.

New terms or terms without an alias get updated immediately, but when term names change, you have to save the term twice.

This only happens with patterns [catpath] and [catpath-raw], not with other patterns like [vocab-raw] or [cat-raw].

Example with terms:

Fruit
- Apple
- Cherry

When inserting those terms, catpath works, aliases are "fruit/apple" or "fruit/cherry" for example.

Editing the term "Cherry" , changing it to "Banana" and saving the term leaves the alias untouched as "fruit/cherry".
Editing the term a second time and just pressing "Save" updates the alias to "fruit/banana".

I dont't know wheter this is the same in 6.x.1.x versions of pathauto, I'm preferring the 6.x.2.x versions because they are using the transliteration module...

Regards,
Boris

Comments

greggles’s picture

Status: Active » Postponed (maintainer needs more info)

Can you confirm the weight of the Pathauto module in the system table?

select name, weight from system where name = 'pathauto';
drubb’s picture

Here they are:

taxonomy = 0
pathauto = 1
token = 10

These seem to be the default values, all other modules = 0.

Regards,
Boris

greggles’s picture

Do you have the same problem with any other token or just catpath?

Maybe this is due to the way catpath is generated/calculated.

drubb’s picture

This only happens with patterns [catpath] and [catpath-raw], not with other patterns like [vocab-raw] or [cat-raw].

:-)

dave reid’s picture

There was a recent bug with the termpath and catpath tokens. Can you re-download the latest -dev release and re-confirm this bug?

drubb’s picture

I did this already, yesterday. I'll have a look on the code. Maybe I'll give a try to a former drupal core version, there are some substantial changes in Drupal 6.17. And I'll try a 6.x.1.x version of pathauto module...

We'll get it, surely!

drubb’s picture

Here are my first results:

- it has nothing to do with drupal core, same in 6.16

- catpaths are working fine with this OLD pathauto dev version (6.x.2.x.dev, april 2009):

// $Id: pathauto.module,v 1.124 2009/04/20 22:52:37 greggles Exp $

This version is ok, too:

// $Id: pathauto.module,v 1.126 2009/10/17 17:45:10 greggles Exp $

Tried both together with d6.17 and latest dev version of token module. The module weights didn't change.

It's always nice to have some kind of archive :-)

So something got lost on the way...

drubb’s picture

And another result:

this bug is also contained in latest 6.x.1.x-dev version!
But NOT in stable 6.x.1.3 version!

dave reid’s picture

Assigned: Unassigned » dave reid
Priority: Critical » Normal
Status: Postponed (maintainer needs more info) » Active

Ok I can reproduce this. Debugging and on it although its hardly critical.

dave reid’s picture

Status: Active » Needs review
StatusFileSize
new2.04 KB
new1.72 KB

Patches for D7 and D6-2 attached for review. BorisB, it would be great if you could test out the 6.x-2.x patch and report back on success/failure.

dave reid’s picture

Version: 6.x-2.x-dev » 7.x-1.x-dev
dave reid’s picture

D'oh. We also need this core patch reviewed: #826334: taxonomy_terms_static_reset() is missing reset for taxonomy_get_parents_all() in order to properly fix this.

dave reid’s picture

StatusFileSize
new1.83 KB

This is the D7 patch that is needed in the meantime.

dave reid’s picture

Status: Needs review » Fixed

I manually tested this on all three branches, so committing to CVS since the testbot is no longer reliable for contrib.
http://drupal.org/cvs?commit=379448
http://drupal.org/cvs?commit=379450
http://drupal.org/cvs?commit=379452

drubb’s picture

I've applied the D6-2 patch to latest 6.x.2.x-dev version and had a short look at it - patch seems to do the job!

Regards,
Boris

Status: Fixed » Closed (fixed)

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