1

I am trying to migrate a CE 1.9.4.5 site to CE 2.4.0 and have installed the data migration tool.
I managed to migrate both Settings and data successfully.
My orders, products, settings etc .. where successfully migrated
But when i try to perform reindex after successful migration, following error occurs

Catalog Search index process unknown error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 't.store_id' in 'field list', query was: SELECT `u`.* FROM ( (SELECT `t`.`value`, `t`.`attribute_id`, `t`.`store_id` FROM `customer_entity_varchar` AS `t` WHERE (entity_id = '3') AND (attribute_id IN ('111', '479', '113', '114', '118', '563', '533', '514', '927', '982')) AND (`store_id` IN ('2', 0)))UNION ALL(SELECT `t`.`value`, `t`.`attribute_id`, `t`.`store_id` FROM `customer_entity_int` AS `t` WHERE (entity_id = '3') AND (attribute_id IN ('119', '940', '941', '937', '117', '120')) AND (`store_id` IN ('2', 0)))UNION ALL(SELECT `t`.`value`, `t`.`attribute_id`, `t`.`store_id` FROM `customer_entity_text` AS `t` WHERE (entity_id = '3') AND (attribute_id IN ('112', '115', '116', '121', '122', '123', '926', '530')) AND (`store_id` IN ('2', 0)))UNION ALL(SELECT `t`.`value`, `t`.`attribute_id`, `t`.`store_id` FROM `catalog_category_entity_varchar` AS `t` WHERE (entity_id = '3') AND (attribute_id IN ('965')) AND (`store_id` IN ('2', 0)))UNION ALL(SELECT `t`.`value`, `t`.`attribute_id`, `t`.`store_id` FROM `customer_entity_datetime` AS `t` WHERE (entity_id = '3') AND (attribute_id IN ('565', '566')) AND (`store_id` IN ('2', 0)))UNION ALL(SELECT `t`.`value`, `t`.`attribute_id`, `t`.`store_id` FROM `customer_entity_decimal` AS `t` WHERE (entity_id = '3') AND (attribute_id IN ('942')) AND (`store_id` IN ('2', 0))) ) AS `u` ORDER BY `store_id` ASC

The same sql error is shown when i take the category menu in backend admin panel.

Note. I checked in my old magento 1.9.4.5 site, there also store_id column is not present in customer_entity_varchar table, but everything is working perfectly there.
Tried migrating data again in a freshly installed magento 2, but no luck.

Thanks in advance for your help.

2 Answers 2

2

Fist of all thank you for the response. I checked the database table eav_entity_type, in the field entity_type_code for catalog_category and the entity_type_id is 9.

Place this id as follow in the query:

UPDATE eav_entity_attribute 
SET  entity_type_id = 9
WHERE entity_attribute_id IN (SELECT entity_attribute_id FROM (
    SELECT eea.*
    FROM `eav_entity_attribute` AS eea
    JOIN `eav_attribute` AS ea ON eea.`attribute_id` = ea.`attribute_id` 
    WHERE ea.`entity_type_id` =  9
) as x);

It's working after I did a flush (php bin/magento cache:flush). Thanks for the solution.

Best regards,

Mike

0
0
UPDATE eav_entity_attribute 
SET  entity_type_id = {entity_type_id_you_need}
WHERE entity_attribute_id IN (SELECT entity_attribute_id FROM (
    SELECT eea.*
    FROM `eav_entity_attribute` AS eea
    JOIN `eav_attribute` AS ea ON eea.`attribute_id` = ea.`attribute_id` 
    WHERE ea.`entity_type_id` =  {entity_type_id_you_need}
) as x);

{entity_type_id_you_need} you can check in eav_entity_type (entity_type_code = 'catalog_category')

Your Answer

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

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