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,

4
  • 1
    this code triggers event sitemap_categories_generating_before if any other module is using same event then its working may get affected. Commented Oct 17, 2018 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 :( Commented Oct 17, 2018 at 17:02
  • 1
    you can run command grep -ir "sitemap_categories_generating_before" app/ to find out module which is using this event. Commented Oct 17, 2018 at 17:03
  • Thanks mate if you can provide above as answer i can accept that, Thanks Commented Oct 17, 2018 at 17:06

1 Answer 1

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.

2
  • Thanks, nothing found on search results, so i think it's not effect by commenting that code. Commented Oct 17, 2018 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. Commented Oct 17, 2018 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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