|Status:||reviewed & tested by the community|
|Issue tags:||D7 stable release blocker|
We have been having trouble getting the xmlsitemap to work in a WAMP setup. We were trying the latest beta version but it was hanging on cron so I tried the most recent dev version (as of yesterday).
I ran xmlsitemap with just one content type included to see if it would generate the sitemap. The cron no longer timed out, but I found errors like those below in the watchdog logs. The key one is the openUri error as all the other errors stem from that one.
I updated the code in xmlsitemap.xmlsitemap.inc to change:
$this->uri = xmlsitemap_sitemap_get_file($sitemap, $page);
$this->uri = $_SERVER['DOCUMENT_ROOT'].'/'.xmlsitemap_sitemap_get_file($sitemap, $page);
and then I no longer got the openUri error and the sitemap was generated properly.
Perhaps there is some system setting that needs to be set for the xmlwriter to be able to find the file properly? I do not normally develop on Windows but this site was put on Windows on the request of the client. Please let me know if you have any idea of how to update the server/settings so as to get the xmlwriter code to understand where the xmlsitemap files live.
Btw, the only post I found that may be related is: http://bugs.php.net/bug.php?id=49051
Thanks in advance for any help you may be able to provide!
XMLWriter::openUri(): Unable to resolve file path in C:\cv-svnroot\trunk\src\www-drupal\sites\all\modules\xmlsitemap\xmlsitemap.xmlsitemap.inc on line 37.
Could not open file sites/default/files/xmlsitemap/NXhscRe0440PFpI5dSznEVgmauL25KojD7u4e9aZwOM/1.xml for writing. in C:\cv-svnroot\trunk\src\www-drupal\sites\all\modules\xmlsitemap\xmlsitemap.xmlsitemap.inc
XMLWriter::setIndent(): Invalid or unitialized XMLWriter object in C:\cv-svnroot\trunk\src\www-drupal\sites\all\modules\xmlsitemap\xmlsitemap.xmlsitemap.inc