[Pkg-mediawiki-devel] Bug#460831: Sitemap index does not contain absolute URLs

Michal Čihař nijel at debian.org
Tue Jan 15 07:28:13 UTC 2008

Package: mediawiki
Version: 1:1.11.0-3
Severity: minor
Tags: patch


sitemaps generated by /usr/share/mediawiki/maintenance/generateSitemap.php 
does not use absolute URL to linking from sitemap index to actual
sitemaps. This is what Google parser reports as an error in sitemap.
Attached patch fixes this issue.

	Michal Čihař | http://cihar.com | http://blog.cihar.com

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.22-3-vserver-amd64 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages mediawiki depends on:
ii  debconf [debconf-2.0]         1.5.18     Debian configuration management sy
ii  lighttpd [httpd]              1.4.18-1   A fast webserver with minimal memo
ii  mime-support                  3.40-1     MIME files 'mime.types' & 'mailcap
ii  php5                          5.2.4-2    server-side, HTML-embedded scripti
ii  php5-mysql                    5.2.4-2+b1 MySQL module for php5

Versions of packages mediawiki recommends:
ii  mysql-server                  5.0.51-2   MySQL database server (meta packag
ii  mysql-server-5.0 [mysql-serve 5.0.51-2   MySQL database server binaries
ii  php5-cli                      5.2.4-2+b1 command-line interpreter for the p

-- debconf information:
* mediawiki/webserver:
-------------- next part --------------
--- generateSitemap.php.orig	2008-01-15 08:20:14.000000000 +0100
+++ generateSitemap.php	2008-01-15 08:23:22.000000000 +0100
@@ -367,9 +367,10 @@
 	 * @return string
 	function indexEntry( $filename ) {
+        global $wgServer;
 			"\t<sitemap>\n" .
-			"\t\t<loc>$filename</loc>\n" .
+			"\t\t<loc>$wgServer$filename</loc>\n" .
 			"\t\t<lastmod>{$this->timestamp}</lastmod>\n" .

More information about the Pkg-mediawiki-devel mailing list