Hello,
I want to first thank you for the truly wonderful package of code you have implemented in this GYM sitemaps package. And the other phpBB SEO packages aren't bad either.
Anyway, I found two bugs in google_xml.php in 2.0RC3 version.
On line 88 you test if the site map to be loaded is a local file or a URL and set the timeout accordingly. It is tested with this code:
if (strpos('http://', $xml_file) !== false)
That test always fails, the test should be:
if (strpos($xml_file, 'http://') !== false)
Then, another bug later in same code, on line 113.
If full XML parsing is not enabled with external sitemaps, (Last modification: no in XML Sitemaps config), the data is simply copied to use.
However, link count for the sitemap is set to 'n/a', which causes the actual sitemap page shown by sitemap.php to give the error message "This page does not contain enough item to be displayed.".
A quick and somewhat dirty fix to this would be removing this line, and adding the following line above unset($xml_data) -line:
str_replace('<url>', '', $xml_data, $this->outputs['urls_sofar']);
This would count the number of URL tags in the XML data, and put the number in the urls_sofar entry in the array.
The other way to resolve this problem would be to change the comparison code for this url_sofars variable, so that it would accept n/a as a positive match so that the sitemap could be shown.

English |
French
