Project:Edit term
Version:6.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

With "edit terms" module enabled, the terms (eg. in node view) link to "taxonomy/term/$tid", altough pathauto has some definitions for the term alias. Furthermore the link "taxonomy/term/$tid" returns the 404 Page.

I found out, that "taxonomy/term/$tid" is in the url_alias table as an alias for "taxonomy/term". (Don't know where this comes from)
When "edit terms" is disabled, another alias is generated, according the pathauto settings and everything works just fine.

I'm not quite sure, if this is really an "Edit term" issue, but on my installation, enabling the module causes 404 errors on the "taxonomy/term/$tid" page.

May be the main problem is, that url-aliases are not generated.

Comments

#1

That sounds like a problem.
I'd encountered some problems with pathauto vs edit_term in an earlier version.
It certainly shouldn't be getting in the way and giving 404s.
We'll have to see if I can replicate this.

#2

I can confirm this.

#3

I traced this to function edit_term_taxonomy (line 313, Edit Term module), specifically path_set_alias, where it appears that if no alias is found, the path_set_alias took the parameter $termpath, where $termpath = taxonomy_term_path($term).

I got this working by replacing the $termpath parameter with the path_set_alias default params $path, $alias, $pid.

  // Also update term alias - line 341
    if (module_exists('path')) {
      if ($term->path) {
        path_set_alias($termpath, $term->path);
      }
      else {
        path_set_alias($path, $alias, $pid);
      }
    }

#4

Version:6.x-1.0» 6.x-1.1

Above applies to latest version...

#5

Status:active» needs review

Current release includes a fix for paths going missing (was deleting aliases if a term was saved programatically)
[#589934]
This MAY probably fix this issue.