3

We're having trouble with the Google sitemap feature in Magento 1.9.0.1. When generating the sitemap the error "Unable to generate the sitemap.".

The file sitemap.xml is created but only contains the following lines:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

We've tried adding a new sitemap and changing the location of the sitemap.xml file but that doesn't change anything.

Any help on the matter would be greatly appreciated.

1

You're getting this error because an Exception is thrown during the sitemap generation process.

     if ($sitemap->getId()) {
        try {
            $sitemap->generateXml();

            $this->_getSession()->addSuccess(
                Mage::helper('sitemap')->__('The sitemap "%s" has been generated.', $sitemap->getSitemapFilename()));
        }
        catch (Mage_Core_Exception $e) {
            $this->_getSession()->addError($e->getMessage());
        }
        catch (Exception $e) {
            $this->_getSession()->addException($e,
                Mage::helper('sitemap')->__('Unable to generate the sitemap.'));
        }
    }

But the addException method replaces the original error with the alternative text "Unable to generate the sitemap".

To find out what the problem is you need to check your var/log/exception.log file (make sure logs are enabled first) and/or the var/reports folder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.