As last step of installing site with custom installation profile I trying to rebuild xmlsitemap with xmlsitemap_rebuild_batch function. Everything work great but after adding some translation modules started appearing this error.An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: ../install.php?profile=fred&locale=en&id=2&op=do StatusText: Service unavailable (with message) ResponseText: Recoverable fatal error: Argument 1 passed to xmlsitemap_menu_xmlsitemap_process_menu_links() must be an array, null given, called in ../sites/all/modules/contrib/xmlsitemap/xmlsitemap.generate.inc on line 456 and defined in xmlsitemap_menu_xmlsitemap_process_menu_links() (line 83 of...
After debugging this functions I found the problem. In function xmlsitemap_rebuild_batch_fetch when the function is called at first time in batch variable $context['sandbox']['max'] is set to count of entities in DB in my case it was 515 entities. Checked it also manualy and the number was correct. But after few cycles of batch I checked it one more time and now there were only 514 entities. This leads to error becouse the ending conditions was always false and $info['xmlsitemap']['process callback']($ids); was called with NULL parameter. I don't know what is causing the difference in count of entities but this situation is possible so I made this patch to fix this situation.
↧
Error while calling function xmlsitemap_rebuild_batch
↧