0

Using Magento EE 1.13.0.1 when saving or duplicating some products (but not all) we get the error:

Unsupported product type "type".

Stack trace:

exception 'Mage_Core_Exception' with message 'Unsupported product type "type".' in /var/www/magento/app/Mage.php:595
Stack trace:
#0 /var/www/magento/app/code/core/Enterprise/Catalog/Model/Index/Action/Product/Price/Abstract.php(290): Mage::throwException('Unsupported pro...')
#1 /var/www/magento/app/code/core/Enterprise/Catalog/Model/Index/Action/Product/Price/Refresh/Changelog.php(82): Enterprise_Catalog_Model_Index_Action_Produ$
#2 /var/www/magento/app/code/core/Enterprise/Catalog/Model/Index/Action/Product/Price/Refresh/Changelog.php(50): Enterprise_Catalog_Model_Index_Action_Produ$
#3 /var/www/magento/app/code/core/Enterprise/Mview/Model/Client.php(109): Enterprise_Catalog_Model_Index_Action_Product_Price_Refresh_Changelog->execute()
#4 /var/www/magento/app/code/core/Enterprise/Catalog/Model/Index/Observer/Price.php(114): Enterprise_Mview_Model_Client->execute('enterprise_cata...')
#5 /var/www/magento/app/code/core/Mage/Core/Model/App.php(1338): Enterprise_Catalog_Model_Index_Observer_Price->processCatalogPriceRulesApplyEvent(Object(Va$
#6 /var/www/magento/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Enterprise_Catalog_Model_Index_Observer_Pri$
#7 /var/www/magento/app/code/core/Mage/CatalogRule/Model/Action/Index/Refresh.php(644): Mage_Core_Model_App->dispatchEvent('catalogrule_aft...', Array)
#8 /var/www/magento/app/code/core/Mage/CatalogRule/Model/Action/Index/Refresh.php(131): Mage_CatalogRule_Model_Action_Index_Refresh->_prepareAffectedProduct$
#9 /var/www/magento/app/code/core/Mage/CatalogRule/Model/Resource/Rule.php(592): Mage_CatalogRule_Model_Action_Index_Refresh->execute()
#10 /var/www/magento/app/code/core/Mage/CatalogRule/Model/Resource/Rule.php(545): Mage_CatalogRule_Model_Resource_Rule->_reindexCatalogRule(Object(Mage_Cata$
#11 /var/www/magento/app/code/core/Mage/CatalogRule/Model/Rule.php(349): Mage_CatalogRule_Model_Resource_Rule->applyAllRules(Object(Mage_Catalog_Model_Produ$
#12 /var/www/magento/app/code/core/Mage/CatalogRule/Model/Observer.php(53): Mage_CatalogRule_Model_Rule->applyAllRulesToProduct(Object(Mage_Catalog_Model_Pr$
#13 /var/www/magento/app/code/core/Mage/Core/Model/App.php(1338): Mage_CatalogRule_Model_Observer->applyAllRulesOnProduct(Object(Varien_Event_Observer))
#14 /var/www/magento/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Mage_CatalogRule_Model_Observer), 'applyAl$
#15 /var/www/magento/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('catalog_product...', Array)
#16 /var/www/magento/app/code/core/Mage/Core/Model/Abstract.php(344): Mage::dispatchEvent('catalog_product...', Array)
#17 [internal function]: Mage_Core_Model_Abstract->afterCommitCallback()
#18 /var/www/magento/app/code/core/Mage/Core/Model/Resource/Abstract.php(110): call_user_func(Array)
#19 /var/www/magento/app/code/core/Mage/Core/Model/Abstract.php(322): Mage_Core_Model_Resource_Abstract->commit()
#20 /var/www/magento/app/code/core/Mage/Catalog/Model/Product.php(1143): Mage_Core_Model_Abstract->save()
#21 /var/www/magento/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php(792): Mage_Catalog_Model_Product->duplicate()
#22 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Catalog_ProductController->duplicateAction()
#23 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('duplicate')
#24 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controlle$
#25 /var/www/magento/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#26 /var/www/magento/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#27 /var/www/magento/index.php(87): Mage::run('default', 'store')
#28 {main}

And the product's entry in catalog_product_entity with type_id set to "Simple"

# entity_id, entity_type_id, attribute_set_id, type_id, sku, created_at, updated_at, has_options, required_options
'10234', '10', '64', 'simple', 'ROK11058', '2014-05-30 13:00:12', '2014-06-09 00:21:57', '0', '0'

Has anyone seen this before? We're not sure what makes this product special, or why it's doing this.

2

This was caused by a corrupted index. This was fixed by reindexing everything from the shell, which is a much stronger reindex process that you can do from the UI or the cron.

php shell/indexer.php --reindexall

I never found out what caused the index to be corrupted.

| improve this answer | |
  • thanks for answering your own question. Please accept your answer so as others that come accross your problem can get the solution. – Julien Lachal Jul 11 '14 at 13:45
  • Julien - I didn't accept this because it's not a good answer. However, I'll update it with a better one! – Tyler V. Jul 15 '14 at 22:48
2

While reindexing made the symptom of this issue go away for a time, it doesn't solve the problem. The problem for our Magento install was actually an errant product type in the database.

You can find products with this entity type with the following:

SELECT * FROM `catalog_product_entity` WHERE `type_id` LIKE '%type%';

And you can run this to find all entity types currently being used by products:

SELECT DISTINCT `type_id` FROM `catalog_product_entity`;

All we had to do was reset the errant products to a type_id of simple and it solved the problem.

One thing to note is that this can start happening after disabling or uninstalling a module which added support for custom product types. If you remove the code that supports these product types, you need to change the product types in the database and/or remove the products that use them.

| improve this answer | |

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.