Not sure what's going on exactly, but Google Webmaster Tools is reporting 91 404 Errors for forum nodes. The odd thing is that I don't have the Forum module enabled. However, a sitemap is being created for these non-existent nodes:

http://www.corydorning.com/sitemap-2.xml

Any idea how i can remove sitemap-2.xml or how I can have the module not include these on my site? I checked my db and i can't find any references to forum nodes either...

Comments

dave reid’s picture

Status: Active » Closed (duplicate)

The problem is this section in xmlsitemap_taxonomy.module:

function _xmlsitemap_taxonomy_get_path($tid) {
  $term = db_fetch_object(db_query("SELECT t.*, v.module FROM {term_data} t INNER JOIN {vocabulary} v ON v.vid = t.vid WHERE t.tid = %d", $tid ));
  if (!$term) {
    return 'taxonomy/term/'. $tid;
  }
  if ($term->module = 'forum') {
    return 'forum/'. $term->tid;
  }
  if ($vocabulary->module != 'taxonomy' && $loc = module_invoke($vocabulary->module, 'term_path', $term)) {
    return $path;
  }
  return 'taxonomy/term/'. $term->tid;
}

Notice that $term->module is not checking equality, but assigning the value 'forum', which will always return true. This has already been fixed in CVS (by using Drupal provided API taxonomy_term_path() instead of this function) and will be available in the next beta. If you want to fix this yourself in the meantime, change line 254 in xmlsitemap_taxonomy.module to:
if ($term->module == 'forum') {

I'm going to mark this as a duplicate of #473316: Use taxonomy_term_path(). Hope this helps!

corydorning’s picture

Thanks for the quick response! and sorry for the duplicate. I did a search before i posted, i must have missed the other one. Thanks again!

EDIT: if anyone else sees this and wants to update it themselves as well, i found the issue to be on line 254 instead of 264 ;)

dave reid’s picture

Bah! I typed a 6 instead of a 5. :) I corrected the line number.