0

I'm using magento 1.9.x version, recently i tried to generate google site map via

Catalogue - > Google Site Map

But it gave 404 error

Then i checked the code and identify the location of error here

/public_html/app/code/core/Mage/Sitemap/Model/Sitemap.php

Line No 165

Mage::dispatchEvent('sitemap_categories_generating_before', array(
            'collection' => $categories
        ));

When i comment out above code site map generates fine. In surface i can't see any side effect of comment that code,

Does anyone know will that effect for other functions of my site,

  • 1
    this code triggers event sitemap_categories_generating_before if any other module is using same event then its working may get affected. – Shashank Kumrawat Oct 17 '18 at 16:58
  • i think it use by some other extension, but i cannot able to find it, which also break the site map generation process without any error or warning :( – Suneth Kalhara Oct 17 '18 at 17:02
  • 1
    you can run command grep -ir "sitemap_categories_generating_before" app/ to find out module which is using this event. – Shashank Kumrawat Oct 17 '18 at 17:03
  • Thanks mate if you can provide above as answer i can accept that, Thanks – Suneth Kalhara Oct 17 '18 at 17:06
1

that commented code triggers the event sitemap_categories_generating_before so possibly any third party module is using it which is causing 404 problem, you need to look into the code of that module.

You can find that module using command grep -ir "sitemap_categories_generating_before" app/.

please put comment if you want to get any assistance.

  • Thanks, nothing found on search results, so i think it's not effect by commenting that code. – Suneth Kalhara Oct 17 '18 at 17:36
  • but I strongly will not recommend you to do any changes in core files. you should copy this file to your local folder of magento. – Shashank Kumrawat Oct 17 '18 at 17:47

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.