2006-05-29
tm
In function runSitemapper()of 'lib/exe/indexer.php' the 'sitemap' variable is
------------------------------
if($conf['usegzip']){
$sitemap = DOKU_INC.'sitemap.xml.gz';
}else{
$sitemap = DOKU_INC.'sitemap.xml';
}
------------------------------
Further on, we have
------------------------------
$url .= urlencode(DOKU_URL.$sitemap);
------------------------------
but 'sitemap', as per above, contains the full unix path to the file, thus resulting in a wrong URL, like
'http://www.google.com/webmasters/sitemaps/ping?sitemap=www.mysite.tld/dokuwiki/var/www/htdocs/dokuwiki/sitemap.xml.gz'
instead of the correct
'http://www.google.com/webmasters/sitemaps/ping?sitemap=www.mysite.tld/dokuwiki/sitemap.xml.gz'
The easy fix is to add
------------------------------
if($conf['usegzip']){
$sitemap = 'sitemap.xml.gz';
}else{
$sitemap = 'sitemap.xml';
}
------------------------------
just before the
------------------------------
$url .= urlencode(DOKU_URL.$sitemap);
------------------------------
line.
PS: the fact that dokuwiki 'pings' Google is not documented anywhere, AFAICT.
The problem is that people may have a firewall in front of their dokuwiki blocking these 'pings' and not know about it.
Shouldn't this be documented?