0

I've got an 11 multi site situation where I have the sitemaps auto generated every day at 4am. It works fine but when I change the generation settings to weekly it still produces a fresh set of sitemap files each morning at 4am.

Any ideas why it would do this?

  • Can you please specify the Magento version you are running ? – Allan MacGregor Sep 25 '13 at 12:59
1

There is a good reason to why the Frequency field is ignored when generating a sitemap.
It's a bug.

The problem is in Mage_Adminhtml_Model_System_Config_Backend_Sitemap_Cron. That's the backend model called when saving the sitemap generation settings.
The frequency is retrieved like this:

$frequncy = $this->getData('groups/generate/frequency/value');

This always returns null. (Also the var name is misspelled but that's not important).
The value should be retrieved like this:

$frequncy = $this->getData('groups/generate/fields/frequency/value');

There is a fields missing in there.
Here they are side by side so you can compare:

$frequncy = $this->getData('groups/generate/frequency/value'); //how it's done
$frequncy = $this->getData('groups/generate/fields/frequency/value'); // how it should be

I don't know what version are you using but I can confirm this is still wrong in ce-1.8.1.0 (and ce-1.7.0.2)

On a side note: the values for $enabled and $errorEmail are retrieved wrongly also, but they are not used in the same model

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.