1

Recently going through this article on Inchoo, I tried their method. After refreshing, I got an integrity constraint violation error, So I just removed the module from Magento.

But to my bad luck, Site has been down since then. The error logs which I have say something like this:

`a:5:{i:0;s:3173:"SELECT `t_d`.`entity_id`, `t_d`.`attribute_id`, `t_d`.`value` AS `default_value`, `t_s`.`value` AS `store_value`, IF(t_s.value_id IS NULL, t_d.value, t_s.value) AS `value` FROM `catalog_category_entity_text` AS `t_d`
 LEFT JOIN `catalog_category_entity_text` AS `t_s` ON t_s.attribute_id = t_d.attribute_id AND t_s.entity_id = t_d.entity_id AND t_s.store_id = 1 WHERE (t_d.entity_type_id = 3) AND (t_d.entity_id IN (216, 10, 16, 39, 211)) AND (t_d.attribute_id IN ('54', '65', '56', '62', '44', '48', '47', '55')) AND (t_d.store_id = 0) UNION ALL SELECT `t_d`.`entity_id`, `t_d`.`attribute_id`, `t_d`.`value` AS `default_value`, `t_s`.`value` AS `store_value`, IF(t_s.value_id IS NULL, t_d.value, t_s.value) AS `value` FROM `catalog_category_entity_int` AS `t_d`
 LEFT JOIN `catalog_category_entity_int` AS `t_s` ON t_s.attribute_id = t_d.attribute_id AND t_s.entity_id = t_d.entity_id AND t_s.store_id = 1 WHERE (t_d.entity_type_id = 3) AND (t_d.entity_id IN (216, 10, 16, 39, 211)) AND (t_d.attribute_id IN ('69', '68', '42', '51', '50')) AND (t_d.store_id = 0) UNION ALL SELECT `t_d`.`entity_id`, `t_d`.`attribute_id`, `t_d`.`value` AS `default_value`, `t_s`.`value` AS `store_value`, IF(t_s.value_id IS NULL, t_d.value, t_s.value) AS `value` FROM `catalog_category_entity_varchar` AS `t_d`
 LEFT JOIN `catalog_category_entity_varchar` AS `t_s` ON t_s.attribute_id = t_d.attribute_id AND t_s.entity_id = t_d.entity_id AND t_s.store_id = 1 WHERE (t_d.entity_type_id = 3) AND (t_d.entity_id IN (216, 10, 16, 39, 211)) AND (t_d.attribute_id IN ('58', '66', '49', '45', '46', '41', '61', '133', '43', '57')) AND (t_d.store_id = 0) UNION ALL SELECT `t_d`.`entity_id`, `t_d`.`attribute_id`, `t_d`.`value` AS `default_value`, `t_s`.`value` AS `store_value`, IF(t_s.value_id IS NULL, t_d.value, t_s.value) AS `value` FROM `catalog_category_entity_datetime` AS `t_d`
 LEFT JOIN `catalog_category_entity_datetime` AS `t_s` ON t_s.attribute_id = t_d.attribute_id AND t_s.entity_id = t_d.entity_id AND t_s.store_id = 1 WHERE (t_d.entity_type_id = 3) AND (t_d.entity_id IN (216, 10, 16, 39, 211)) AND (t_d.attribute_id IN ('59', '60')) AND (t_d.store_id = 0) UNION ALL SELECT `t_d`.`entity_id`, `t_d`.`attribute_id`, `t_d`.`value` AS `default_value`, `t_s`.`value` AS `store_value`, IF(t_s.value_id IS NULL, t_d.value, t_s.value) AS `value` FROM `catalog_category_entity_decimal` AS `t_d`
 LEFT JOIN `catalog_category_entity_decimal` AS `t_s` ON t_s.attribute_id = t_d.attribute_id AND t_s.entity_id = t_d.entity_id AND t_s.store_id = 1 WHERE (t_d.entity_type_id = 3) AND (t_d.entity_id IN (216, 10, 16, 39, 211)) AND (t_d.attribute_id IN ('70')) AND (t_d.store_id = 0) UNION ALL SELECT `t_d`.`entity_id`, `t_d`.`attribute_id`, `t_d`.`value` AS `default_value`, `t_s`.`value` AS `store_value`, IF(t_s.value_id IS NULL, t_d.value, t_s.value) AS `value` FROM `catalog_category_entity_boolean` AS `t_d`
 LEFT JOIN `catalog_category_entity_boolean` AS `t_s` ON t_s.attribute_id = t_d.attribute_id AND t_s.entity_id = t_d.entity_id AND t_s.store_id = 1 WHERE (t_d.entity_type_id = 3) AND (t_d.entity_id IN (216, 10, 16, 39, 211)) AND (t_d.attribute_id IN ('146')) AND (t_d.store_id = 0)`

Is there anything I can do? I don't want to say good bye to this site(It's almost in production environment).

0

Simply removing or disabling the custom module will NOT revert the database changes made if you followed the Inchoo tutorial you had mentioned. You'll want to revert these changes to correct the problem, most likely.

Please see:

On how to remove the custom attribute from the DB.

In short:

<?php
include 'app/Mage.php';
Mage::app();
$setup = Mage::getResourceModel('catalog/setup','catalog_setup');
$setup->removeAttribute('catalog_category','yourcustomattributenamehere');
  • 1
    Man! You saved me from another magento installation. I was really about to going for the direct database approach. Thanks a lot! – Prateek May 12 '14 at 22:40

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.