On _site_map_taxonomy_tree, "/all" suffix on categories forbids URL alias rendering. This results in asymmetry between aliased categories path (on nodes) and category path generated by sitemap.

Here's a patch (on 5.x-1.2 version) to solve this issue. If "all" suffix is detected, taxonomy_term_path($term) is returned instead "/all" suffixed version.

CommentFileSizeAuthor
catalias.patch605 byteschirale
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chirale’s picture

Status: Active » Needs review
frjo’s picture

Title: /all suffix forbids taxonomy URL aliasing » How to remove /all suffix from taxonomy URLs

I guess that you like everyone else that has this problem is using pathauto module and it happens to autogenerate path aliases for taxonomy/term/[id] with out any "/all" or "/0" etc. on the end.

I believe your problem will be solved with entering "-1" for "Categories depth" in the site map settings.

The description for that settings state "Specify how many subcategories should be included on the categorie page. Enter "all" to include all subcategories,"0" to include no subcategories, or "-1" not to append the depth at all."

frjo’s picture

Category: bug » support
Status: Needs review » Fixed
chirale’s picture

Well, I used a block with this PHP code to return a "flat" category tree with no subcategories.

print _site_map_taxonomys();

Result (demographic)

Then, I leave the separated sitemap page as is. Result

I want Sitemap page show the entire tree, but when a single category has no subcategories now I have to set that flag to -1 globally? Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

-Mania-’s picture

Thanks, setting the "Categories depth" to -1 worked for me. However the RSS icons were still linking to system paths. I set the "RSS feed depth" to 0 to fix that.

nickonom’s picture

Version: 5.x-1.2 » 7.x-1.1
Issue summary: View changes
Status: Closed (fixed) » Active

Setting "RSS feed depth" to 0 as suggested in #6 didn't help, so I had to use https://www.drupal.org/project/path_alias_xt. I wonder was this changed since -Mania- succeeded to get it right 6 years ago?

thalles’s picture

Thanks @all!
issue fixed for no activity.

thalles’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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