Hello,

The site map module used to work fine for me but recently someone pointed out to me that my Site map does not work correctly.

When I click on Site map (as a seconday link in the footer of my page - www.weekendje-hamburg.nl) the sitemap.xml stored on the server shows up.

I have no clue how to solve this. Does anyone of you?

Thanks in advance.

Regards,

Bart

Comments

enzipher’s picture

I don't exactly have the same issue, but I suspect that the cause is the same. My problem is that when going to /sitemap the frontpage is displayed and not the sitemap.

In hook_menu() in the Site map module I tried changing "sitemap" to "site-map" and after that things worked, the sitemap was displayed under /site-map.

I think this is caused by incompatibility with the XML Sitemap module (which creates the path /sitemap.xml) and also, as it seems, when creating a static file in the root called "sitemap.xml".

... Just tried to make a new url alias from /sitemap to /site-map, and that seems to work as well. Perhaps you can try to do that B-art.

However, a better workaround is advised.

B-art’s picture

Thanks a lot for the workaround! It works.

But like you mentioned, it's a workaround and not a definite solution.

So far I'm happy though.

Thanks for your quick help.

philou-1’s picture

Got the same problem... I' m trying the work around but I'm not sure of what i'm doing.

could you help me by giving some more directions?
where to change sitemap to site-map? in the site_map.module file?

I have this:

/**
 * Implementation of hook_menu().
 */
function site_map_menu() {
  $items['admin/settings/site-map'] = array(
    'title' => 'Site map',
    'description' => 'Control what should be displayed on the site map.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('site_map_admin_settings'),
    'access arguments' => array('administer site configuration'),
    'file' => 'site_map.admin.inc',  
    'type' => MENU_NORMAL_ITEM,
  );
  $items['site-map'] = array(
    'title' => 'Site map',
    'description' => 'Display a site map with RSS feeds.',
    'page callback' => 'site_map_page',
    'access arguments' => array('access site map'),
    'type' => MENU_SUGGESTED_ITEM,
  );

  return $items;
}
B-art’s picture

Hi Philou,

I just added a URL alias in the menu URL-Aliases. So now sitemap points to site-map.

That's all.

Regards,

Bart

enzipher’s picture

@philou: If you are going to hack the module you need to clear your cache in order for it to work. However, I -strongly- recommend not to do so (it's bad for your health and uncool), instead, use the URL Alias workaround as B-art said.

So go to /admin/build/path/add and type sitemap under "Existing system path:" and site-map " in the "Path alias" box, click "Create new alias" and you are all set.

philou-1’s picture

Ok, thanks enzipher and B-art!

actually I was looking to modify the URL alias sitemap (and couldn't find it), not add it. cool, it works.

hass’s picture

Status: Active » Fixed

I believe this is an auto filename detection rule from apache... - I cannot remember the name of this option... aside you are not using a drupal way

www.weekendje-hamburg.nl -> SOFTplus GSiteCrawler is not the xmlsitemap module and must cause issues. Save your xmlsitemap with a different name. Filenames on disk always have priority over menu hook urls.

Status: Fixed » Closed (fixed)

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