When I create a new term in a vocabulary that is set to generate just [cat-raw] as URL alias I also get a second URL alias that takes the first target as alias and points it to taxonomy/term/.
Example:
1) I create a term named Test4
2) Using the verbose option Pathauto tells me that it Created new alias test4 for taxonomy/term/201
3) In the URL alias list I find test4 that points to taxonomy/term/201
4) But I *also* find a second new alias taxonomy/term/201 that points to taxonomy/term/
What's the point of the second alias created? I can't understand why it's being created.
If I delete all aliases and bulk generate them, the same thing happens: an expected alias is created, and then a second alias is created using the real path as an alias for taxonomy/term/.
I had the Edit term module active first, but the behaviour was still there when I disabled it.
I've tried to search to see if this is a known issue (or even a expected behaviour) but I couldn't find anything about it.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | pathauto_term_bug.png | 11.77 KB | meba |
Comments
Comment #1
mariano.barcia commentedI'm suffering from this very same problem, exactly as you described it (same version 5-x.2-3).
Comment #2
WiseMike commentedI'm too. version 5-x.2.3
Comment #3
meba commentedThis is a bug, in 6.x also. It makes pathauto taxonomy aliases unusable.
Comment #4
greggles@meba - unusable in what way?
Comment #5
meba commentedInstead of url aliases for taxonomy terms, you get aliases like: "taxonomy/term/123" -> "taxonomy/term" = nonsense. The only fix is to do it manually, which is not "auto". Same appears with 6.x and bulk generating aliases.
Comment #6
gregglesI can't duplicate this exact issue, but I found something similar:
Manual method:
1) Deleted all aliases
2) Created a new vocabuary
3) Created a term in that vocabulary
Expected results:
2 aliases, one for the term, one for the feed.
Actual results:
| 424 | taxonomy/term/10 | category/simple/asdf-qwer-poiu | |
| 425 | taxonomy/term/10/0/feed | category/simple/asdf-qwer-poiu/feed | |
Bulk method:
1) deleted all aliases
2) selected the "bulk generate" option for taxonomy term paths
Expected results:
As above in manual process.
Actual results:
As above in manual process.
Bulk method with a " " (space) as the "Internal feed alias text (leave blank to disable): "
1) deleted all aliases
2) selected the "bulk generate" option for taxonomy term paths
Expected results:
Alias is created, but not the feed alias.
Actual results:
Alias is created and the feed alias is as well with the " " space character as the placeholder.
But that sounds slightly different from what you all are experiencing so I created it at #306512: trim the feed pattern prior to use in case someone inserts whitespace. So, this remains "needs more info" about how to consistently reproduce the issue.
Comment #7
meba commentedSteps to reproduce:
1) Install Drupal 6.4
2) Enable pathauto 6.x-1.1, token 6.x-1.11
3) Pathauto configuration: Verbose mode, "Do nothing, leave alias", Transliterate (using i18n-ascii.txt)
4) Create a new vocabulary "vocabtest"
5) Create new term in vocabtest, called "testterm"
Expected result:
category/vocabtest/testterm -> taxonomy/term/1
Actual result:
category/vocabtest/testterm -> taxonomy/term/1
taxonomy/term/1 -> taxonomy/term/
More steps:
1) Disable pathauto, delete all url aliases
2) Create terms term1, term2, term3
3) Enable pathauto
4) Click URL Aliases -> Automated alias settings -> Taxonomy term path settings. Check " Bulk generate aliases for terms that are not aliased"
5) Save
Expected result:
"Bulk generation of terms completed, XX aliases generated."
Actual result:
"Bulk generation of terms completed, 0 aliases generated."
3 aliases generated (for each term)
taxonomy/term/1 -> taxonomy/term/
taxonomy/term/2 -> taxonomy/term/
taxonomy/term/3 -> taxonomy/term/
Attaching a screenshot
Comment #8
gregglesAre you using any other contributed modules?
Comment #9
meba commentedEnabled core modules:
Color
Comment
Database logging
Help
Menu
Path
Taxonomy
Update status
Other:
Pathauto
Token
So...no, no other contributed modules. I just reproduced the issue at a test installation.
Comment #10
AdrianB commentedmeba's description in #7 looks like my original problem (but mine was with 5.x-2.3 and Drupal 5.x). I haven't tried it on a separate test installation though.
Comment #11
gielfeldt commentedIn line 117 of pathauto_taxonomy.inc version 5.x-2.3 it reads:
$src = taxonomy_term_path($category->tid);
however taxonomy_term_path accepts a taxonomy-object, not an id.
if changed to:
$src = taxonomy_term_path($category);
it seems to correct the above error
can anyone confirm this?
Comment #12
greggles@giefeldt - that was fixed in the latest 5.x-2.x-dev version because of #278368: taxonomy_term_path being passed TID instead of Term Object
Is this problem still present after that fix? Perhaps this issue is a duplicate of that and the reason that I didn't see the issue is because I was testing the atest 5.x-2.x-dev.
Comment #13
gielfeldt commented@greggles - Sorry, I didn't check the dev-version. It seems to be corrected there.
Comment #14
gregglesSo this is a duplicate of that one, then.
There is a wiki for keeping track of which major issues to fix prior to the next release of Pathauto. Let's use that to determine what we need to fix prior to the release.
Thanks.
Comment #15
zamir commentedI think this fix has been made in the dev version - see here: http://drupal.org/node/278368
http://www.001it.com.cn
Comment #16
dakku commentedstrangly enough I have the exact same issue in D6.. anyone looking at fixing this?
Comment #17
mrkistic commentedIt exists in D6 too dakku. You need to apply the patch as described in the ticket above (278368 - the same thing gielfeldt described). Despite it being discovered and patched over a year ago, for whatever reason it's not deemed important enough to push out into a production release. Which is a shame 'cos I'd love the time back I wasted searching for this error.
Comment #18
dakku commented@ MrKistic,
Thanks MrKistic, Its a shame that no one sees it imporant. year on year the problems pile in hopefully it should get fixed. Pathing individual installs is not a solution in my opinion as this breaks the upgrade path.
Comon "the powers that be", lets get this issue sorted..?
Comment #19
seancorrales commentedI'm in agreement with MrKistic and dakku - this is a big problem in both 5 and 6. Either these fixes need to be pushed to the production releases or the project page needs to reflect that if you want to use Taxonomy and have paths actually work, you need to grab the dev version. It's kind of ridiculous that the problem has been resolved for this long but still hasn't made it to production.
Comment #20
gregglesGreat. You think it's ridiculous that it's been "broken" and I think it's ridiculous that nobody takes my advice and uses the planning wiki.
#369840: If a user changes the automatic path, try to remember that in the future is the last issue I want to fix before a release. If you help review that we'll be good to go.
Comment #21
mxmilkiib commentedsubscribe
Comment #22
mrkistic commentedYou probably don't need the quotes around broken, it really was causing problems as shown by the patch and the comments above.
You're right in that we should contribute back and I'm happy to do so. In fact I was attempting to do so when I found the bug I'd discovered was already patched so long ago. That's fine for forward development but the reason this has come up is our collective surprise at the fact that code that's been fixed for over a year is still not in the production version. That's the killer.
I've just had a look at the one remaining issue you listed there and after reading through all 99 comments on the issue I'm not really clear on what's required to get it to completion. Is there a summary version somewhere or a concise task list perhaps? Happy to help just need to know what you need to get there!