Closed (won't fix)
Project:
Site map
Version:
5.x-1.1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Jan 2008 at 16:30 UTC
Updated:
31 Jul 2008 at 06:35 UTC
hi notice site map doesn't seem to use aliases for the urls it creates, is there anyway to make it do this?
I saw there was another request for this that was listed as a duplicate but for the life of me i can't find where the answer was in bugs, readme or cvs message browsing.
thanks for this great module
Comments
Comment #1
frjo commentedSitemap already use path alias, just like the rest of Drupal does. All links is built with the standard l function, http://api.drupal.org/api/function/l/5.
Comment #2
kalin9 commentedOkay,
I took a closer look it looks like it's most often caused by site map making urls like
/taxonomy/term/44/all
instead of
/taxonomy/term/44
So pathauto (what i assume most of us are using not just url alias) might have already made an alias for the latter, but not the former.
I was able to change this so that it use the latter term, and find the alias by hacking
//$output .= l($term->name, "taxonomy/term/$term->tid/$cat_depth", array('title' => $term->description));
$output .= l($term->name, "taxonomy/term/$term->tid", array('title' => $term->description));
i don't claim to have looked at it enough to know if it will cause other issues.
so for me the only ones it now doesn't show the alias for is my forums, and that looks to be same thing. it finds the taxonomy url but that isn't the more commonly already aliased url. I'm looking to see if I can hack a fix for that.
Anyway personally i'd suggest this as an option/tweak or patch, if you had the time and were inclined. I think most of us are going to want it to try to use aliases and will have urls as aliased by path auto. thanks
Comment #3
frjo commentedThere is already a setting for this:
Comment #4
niklp commentedThis is NOT fixed in 1.1. The option to put -1 in that box doesn't exist in that version.
There are a couple of other issues on this "all" front, and I notice they are not getting attention.
Further to the above problem, which could be addressed by upping the dev -> 1.2, a similar problem also exists with RSS. (FYI I am using the default View, taxonomy/term, here).
If I have no pathauto installed, I would normally get urls (per term/feed pair) of:
/taxonomy/term/1 and taxonomy/term/1/feed
If I have pathauto installed, this changes. If I set categories depth to -1, and RSS feed depth of 0, I get:
/blog/tags/whatever and /blog/tags/whatever/feed - this won't work with Views - the latter url maps to the same content as the first url. This is duplicate content, and is a serious issue. This simply will not work with Views.
If I set RSS feed depth to "all" now, instead, the latter url is still not effective: /taxonomy/term/10/all/feed
This is still not going to work with Views, and again is duplicate content.
Also, under both the last situations, feeds simply don't work, because Views cannot handle the arguments that site_map passes.
If site_map used /taxonomy/term/x/feed - this works fine. I think the issue is caused by Views, but this view is used a LOT so this should be checked for.
Comment #5
niklp commentedForgot to change status, bah.
Comment #6
niklp commentedSpoke to greggles and a couple other people (regarding new feed aliases in pathauto 2.1) and can confirm that this is a site_map.module problem, caused by views overriding the taxonomy/term output.
Comment #7
frjo commentedComment #8
niklp commentedCan you give at least a reason why it's "won't fix" please? :)
Comment #9
frjo commentedBecause the problem comes from using a example taxonomy view.
If someone contribute a good patch that checks for this I will commit it.