Vinai / groupscatalog2

Magento extension to enable you to hide categories and products from customers depending on their customer group. This is a Magento 1.6 and newer compatible version of the Netzarbeiter Customer Groups Catalog extension.
139 stars 60 forks source link

Netzarbeiter_GroupsCatalog2 SEO Sitemap #12

Closed ghost closed 12 years ago

ghost commented 12 years ago

Hallo,

ich habe die Netzarbeiter_GroupsCatalog2 in Magento 1.6.2 installiert. Nun funktioniert die SEO Sitemap nicht mehr. Kannst du mir weiterhelfen?

Besten Dank

Frank Nerger

Vinai commented 12 years ago

I'll switch to english so others may profit from your report, too. Hope thats okay.

What does "The SEO Sitemap doesn't work anymore" mean? Error messages? Any related records in var/log/exception.log or var/log/system.log? What is the behaviour you expect?

ghost commented 12 years ago

this is the error message: Item (Mage_Catalog_Model_Category) with the same id "11" already exist

system.log content:

2012-09-07T21:53:14+00:00 ERR (3): Recoverable Error: Argument 1 passed to Netzarbeiter_GroupsCatalog2_Model_Observer::_addGroupsCatalogFilterToCollection() must be an instance of Mage_Eav_Model_Entity_Collection_Abstract, instance of Mage_Catalog_Model_Resource_Category_Flat_Collection given, called in /Applications/MAMP/htdocs/test-shop/app/code/community/Netzarbeiter/GroupsCatalog2/Model/Observer.php on line 74 and defined in /Applications/MAMP/htdocs/test-shop/app/code/community/Netzarbeiter/GroupsCatalog2/Model/Observer.php on line 408 2012-09-07T21:53:14+00:00 ERR (3): Recoverable Error: Argument 1 passed to Netzarbeiter_GroupsCatalog2_Model_Resource_Filter::addGroupsCatalogFilterToCollection() must be an instance of Mage_Eav_Model_Entity_Collection_Abstract, instance of Mage_Catalog_Model_Resource_Category_Flat_Collection given, called in /Applications/MAMP/htdocs/test-shop/app/code/community/Netzarbeiter/GroupsCatalog2/Model/Observer.php on line 415 and defined in /Applications/MAMP/htdocs/test-shop/app/code/community/Netzarbeiter/GroupsCatalog2/Model/Resource/Filter.php on line 59 2012-09-07T21:53:14+00:00 ERR (3): Recoverable Error: Argument 1 passed to Netzarbeiter_GroupsCatalog2_Model_Observer::_addGroupsCatalogFilterToCollection() must be an instance of Mage_Eav_Model_Entity_Collection_Abstract, instance of Mage_Catalog_Model_Resource_Category_Flat_Collection given, called in /Applications/MAMP/htdocs/test-shop/app/code/community/Netzarbeiter/GroupsCatalog2/Model/Observer.php on line 74 and defined in /Applications/MAMP/htdocs/test-shop/app/code/community/Netzarbeiter/GroupsCatalog2/Model/Observer.php on line 408 2012-09-07T21:53:14+00:00 ERR (3): Recoverable Error: Argument 1 passed to Netzarbeiter_GroupsCatalog2_Model_Resource_Filter::addGroupsCatalogFilterToCollection() must be an instance of Mage_Eav_Model_Entity_Collection_Abstract, instance of Mage_Catalog_Model_Resource_Category_Flat_Collection given, called in /Applications/MAMP/htdocs/test-shop/app/code/community/Netzarbeiter/GroupsCatalog2/Model/Observer.php on line 415 and defined in /Applications/MAMP/htdocs/test-shop/app/code/community/Netzarbeiter/GroupsCatalog2/Model/Resource/Filter.php on line 59

behavior: the output sitemap

Vinai commented 12 years ago

Thanks for the info, I'll look into it during the coming week as I don't have access to my dev environment this weekend.

Vinai commented 12 years ago

I'm unable to reproduce the issue in Magento 1.6.2.0 and Magento 1.7.0.2.

Tried both with flat catalog disabled and enabled. Unless you can give me access to your database (without anonymized customer and admin data) I'm afraid I'll be unable to help.

PaterSiul commented 12 years ago

I seem to be having the same(?) problem.

System Log says: 2012-10-08T09:18:18+00:00 ERR (3): Recoverable Error: Argument 1 passed to Netzarbeiter_GroupsCatalog2_Model_Observer::_addGroupsCatalogFilterToCollection() must be an instance of Mage_Eav_Model_Entity_Collection_Abstract, instance of Mage_Catalog_Model_Resource_Category_Flat_Collection given, called in /var/www/magento/app/code/community/Netzarbeiter/GroupsCatalog2/Model/Observer.php on line 74 and defined in /var/www/magento/app/code/community/Netzarbeiter/GroupsCatalog2/Model/Observer.php on line 370 2012-10-08T09:18:18+00:00 ERR (3): Recoverable Error: Argument 1 passed to Netzarbeiter_GroupsCatalog2_Model_Resource_Filter::addGroupsCatalogFilterToCollection() must be an instance of Mage_Eav_Model_Entity_Collection_Abstract, instance of Mage_Catalog_Model_Resource_Category_Flat_Collection given, called in /var/www/magento/app/code/community/Netzarbeiter/GroupsCatalog2/Model/Observer.php on line 377 and defined in /var/www/magento/app/code/community/Netzarbeiter/GroupsCatalog2/Model/Resource/Filter.php on line 59 2012-10-08T09:18:18+00:00 ERR (3): Recoverable Error: Argument 1 passed to Netzarbeiter_GroupsCatalog2_Model_Observer::_addGroupsCatalogFilterToCollection() must be an instance of Mage_Eav_Model_Entity_Collection_Abstract, instance of Mage_Catalog_Model_Resource_Category_Flat_Collection given, called in /var/www/magento/app/code/community/Netzarbeiter/GroupsCatalog2/Model/Observer.php on line 74 and defined in /var/www/magento/app/code/community/Netzarbeiter/GroupsCatalog2/Model/Observer.php on line 370 2012-10-08T09:18:18+00:00 ERR (3): Recoverable Error: Argument 1 passed to Netzarbeiter_GroupsCatalog2_Model_Resource_Filter::addGroupsCatalogFilterToCollection() must be an instance of Mage_Eav_Model_Entity_Collection_Abstract, instance of Mage_Catalog_Model_Resource_Category_Flat_Collection given, called in /var/www/magento/app/code/community/Netzarbeiter/GroupsCatalog2/Model/Observer.php on line 377 and defined in /var/www/magento/app/code/community/Netzarbeiter/GroupsCatalog2/Model/Resource/Filter.php on line 59

Trace on Frontend: There has been an error processing your request Item (Mage_Catalog_Model_Category) with the same id "11" already exist

Trace:

0 /var/www/magento/lib/Varien/Data/Collection/Db.php(576): Varien_Data_Collection->addItem(Object(Mage_Catalog_Model_Category))

1 /var/www/magento/lib/Varien/Data/Collection.php(741): Varien_Data_Collection_Db->load()

2 /var/www/magento/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Tree/Category.php(106): Varien_Data_Collection->getIterator()

3 /var/www/magento/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Tree/Category.php(60): Mage_Catalog_Block_Seo_Sitemap_Tree_Category->prepareCategoriesToPages()

4 /var/www/magento/app/code/core/Mage/Core/Block/Abstract.php(238): Mage_Catalog_Block_Seo_Sitemap_Tree_Category->_prepareLayout()

5 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))

6 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('catalog/seo_sit...', 'seo.sitemap.sit...')

7 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('catalog/seo_sit...', 'seo.sitemap.sit...')

8 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))

9 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))

10 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()

11 /var/www/magento/app/code/core/Mage/Catalog/controllers/Seo/SitemapController.php(64): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()

12 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Catalog_Seo_SitemapController->categoryAction()

13 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('category')

14 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))

15 /var/www/magento/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()

16 /var/www/magento/app/Mage.php(683): Mage_Core_Model_App->run(Array)

17 /var/www/magento/index.php(87): Mage::run('', 'store')

18 {main}

I'd love to give you access to the system. Unfortunatly this is a privacy issue, so I can't. If there is anything else, please ask.

Vinai commented 12 years ago

Are you also using Magento 1.6?

ghost commented 12 years ago

have you installed the Market Ready Germany? Market Ready Germany makes problems. that was the porblem with me

PaterSiul commented 12 years ago

No, I use Magento 1.7.0.2. No, I didn't have Market Ready Germany installed. For tests, I removed every extension but Groups Catalog -> no change. What makes a change, though, is disabling "Use Flat Catalog Category". Then it works. I tried upgrading groups catalog, it doesn't help either.

I can now give you database, backend and ftp access, if you wish. But I'd need an email address. Or should I send it via Magento connect?

Vinai commented 12 years ago

Hi, my email address is "vinai .... the-little-round-thingy ..... netzarbeiter .... com".

Vinai commented 12 years ago

Thank you for the credentials. I logged in to the admin interface and enabled both the catalog and the products flat catalog. Then I navigated to Catalog > Google Sitemap and regenerated both both configured sitemaps without any exception. I also checked the resulting files which looked complete. What am I missing? Can you please elaborate further how to reproduce the exception?

PaterSiul commented 12 years ago

Ah! That was a misunderstanding. You find the sitemap in question under http://debug246.galamondo.de/catalog/seo_sitemap/category/. Or rather you should. The Link to it is in the footer "Site Map" or "Sitemap", depending on the language.

Vinai commented 12 years ago

Should be fixed in current HEAD (see commit 5f98a1d7211498c18009e108ee61cdf827f1eab8). Release on Magento Connect pending as version 0.2.1

PaterSiul commented 11 years ago

Thanks! Works like a charm now.