Hi,

Taxonomies are showing on the XML sitemap as: http://www.URL.com/taxonomy/term/28 instead of showing with the assigned URL alias.

Thanks very much

Comments

Eugene Fidelin’s picture

I have rhe sameproblem - if an alias is generated by pathuto

faunapolis’s picture

I just unistalled (not just deactivated, but unistalled) the module, then installed the latest module (dev) verstion, and then now paths are showing correctly. Before unistalling go and copy all your verification codes and keys from your XML sitemap settings page, so that you have them and can reinstate them.

Eugene Fidelin’s picture

I just notice that only new terms (which were created after module was installed) are displayed correctly with path aliases.

Anonymous’s picture

+1 I can confirm this bug and as a result I am getting warnings in Google Webmaster Tools.

txcrew

idflorin’s picture

me too, i have the same problem
--
Style Snatch

Anonymous’s picture

Although it is not ideal, the solution in #2 does in fact solve this problem. It seems that there is something with the taxonomy aliases that pathauto batch generates that the XML sitemap does not like. However, if those aliases are generated one at a time, i.e. on node or taxonomy creation/edit it works just fine. It sounds like it could be a bug perhaps??

txcrew

janwari’s picture

Im facing a similar problem with my custom module. Even though pathauto generates the alias XML Sitemap doesnt seem to recognize it. Must be a bug.

ekrispin’s picture

We have the very same problem too. If you look at table xmlsitemap_term, you see that for all terms, previously_changed = NULL and priority_override = NULL

junyor’s picture

Status: Active » Closed (duplicate)
basvredeling’s picture

Status: Closed (duplicate) » Fixed

This is not a duplicate of the aforementioned (in comment #9).

I fixed this problem in a recent 5.x-2.x-dev version (should apply to older versions too, though line numbers might be messed up). The problem is that forum id's are the only taxonomy/term id's being aliased. What you need to do is alter line 65 in /modules/xmlsitemap/xmlsitemap_term/xmlsitemap_term.module
It reads:
LEFT JOIN {url_alias} ua ON ua.src = CONCAT('forum/', CAST(t.tid AS $cast))

change that line to:
LEFT JOIN {url_alias} ua ON ua.src = CONCAT('taxonomy/term/', CAST(t.tid AS $cast)) || ua.src = CONCAT('forum/', CAST(t.tid AS $cast))

Next, you should regenerate the sitemap.
First: truncate the xmlsitemap table.
Then: generate the xmlsitemap again by saving the settings on this page: /admin/settings/xmlsitemap

that should do the trick.

I attached a patch file with the update.
Another solution has been posted here: http://drupal.org/node/285549

FlemmingLeer’s picture

Title: taxonomies not showing with URL alias » path URL alias not getting through to sitemap
Version: 5.x-1.4 » 5.x-1.6
Component: xmlsitemap_term » xmlsitemap_node

I have a similar issue but concerning xmlsitemap_node.

Due to duplicate content I have restricted all /node/ in the robots.txt file but url aliases don't appear on the sitemap.xml at all.

I tried truncating all the xml sitemap tables but only /node/xxx appears on the sitemap.xml file.

I have pathauto installed and the following configuration:

Drupal 5.10

MySQL database 5.0.32
PHP 5.2.6-0.dotdeb.1
PHP register globals Ingen
Unicode library PHP Mbstring Extension
Web server Apache/2.2.3 (Debian)

Edit (9. september 2008):
I tried the above xmlsitemap_term edit and the patch here http://drupal.org/node/285549
Both instances shows an empty sitemap.xml

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

oash’s picture

Hi,
I went through the same problem until i found the proper solution.

[1] goto admin/build/path
[2] Delete aliases

[3] goto admin/settings/pathauto
[4] edit general settings
[5] goto Maximum number of objects to alias in a bulk update, modify the number to a large number say 1000
[6] generate all paths
[7] generate the sitemap www.example.com/sitemap.xml

When i performed the previous steps in addition to advice #10, i managed to wipe out all taxonomy/term records in the xml file.

good luck

casperl’s picture

subscribe
(this may be a closed bug - sorry, issue, but sure as little green apples it is still affecting me!)

My versions are:

Drupal 5.12
XML Sitemap 5.x-1.6
Pathauto 5.x-2.3

casperl’s picture

I must also report this - the "solution" offered by oash (#13) above, works 100%.

However - BEWARE, BEWARE, BEWARE!!!

That solution effectively wipes your custom URL's and leaves your page navigation system and menus referencing non-existent URL's totally redundant. In my case, step 6 "Generate All Paths" effectively meant opening every single page on the site and re-assigning a custom URL while making sure that they co-incided with the URL's referenced in the menu system.

Fortunately this was a site with less than 30 nodes!

And of course, now this issue has effectively gone away for me, but I suspect the bugs still lurk in the code somewhere and are therefore very much alive and waiting to bite the next Drupal site! Maybe closing issues automatically due to non-activity is NOT a good idea, but that is obviously a minority opinion!

Anonymous’s picture

Regarding the solution in post 13.
I have far too many URL names to do that.
How can I fix the problem otherwise??
Does anyone have any solution? I've tried all sorts to fix this.

caf’s picture

Version: 5.x-1.6 » 6.x-1.x-dev
Component: xmlsitemap_node » xmlsitemap.module

The same problems here with drupal 6.9 and XML Sitemap as #16

Mike_Waters’s picture

Version: 6.x-1.x-dev » 6.x-1.1

To fix it I patched xmlsitemap_taxonomy.module (6x-1.1), changed the following at about line 217 (in xmlsitemap_taxonomy_xmlsitemap_links()):

    $row->loc = taxonomy_term_path($term);
+   if (module_exists('pathauto')) {
+     $row->loc = drupal_get_path_alias($row->loc);
+   }

When this module writes records to the sitemap table (which is the source of the sitemap xml), it gets the taxonomy urls from taxonomy.module; this patch checks for the pathauto module, and if its installed it gets the url alias of the term path. I suppose you dont even need to check for pathauto, since drupal_get_path_alias() is in drupal core (path.inc).

Then just uninstalled and then reinstalled xmlsitemap, and the pathauto-generated paths replaced the /taxonomy/term/!tid paths.

Anonymous’s picture

Version: 6.x-1.1 » 6.x-1.x-dev

@Mike_Waters: We appreciate your work but to have it more fully appreciated can you please open a new issue?

Mike_Waters’s picture

I submitted an issue (with a patchfile) yesterday, but I do not see it in the issues queue (or my user tracking page). Was it deleted? Or did I screw it up somehow?

dave reid’s picture

@Mike_Waters, I'm guessing you mean your reply in comment #18 above, because this is the only issue in the XML sitemap issue queue that you've participated in. Because this issue's status is 'closed' it won't show up by default in issue lists. You have to select '- Any -' in the status field.

Mike_Waters’s picture

Sorry, it was my fault. I had like 10 browser windows open, forgot to click the button yesterday. It's now submitted....