I am very new to magento and am finding it ok to use (after overcomming a lot of issues it has) however i am now at one spot cdwhere i cant seem to resolved an issue i have with the Product EAV Indexer
/opt/plesk/php/7.0/bin/php bin/magento index:reindex catalog_product_attribute
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'mage_catalog_product_index_eav_idx.source_id' in 'field list', query
was: INSERT INTO
mage_catalog_product_index_eav
(entity_id
,attribute_id
,store_id
,value
,source_id
) SELECTmage_catalog_product_index_eav_idx
.entity_id
,mage_catalog_product_index_eav_idx
.attribute_id
,mage_catalog_product_index_eav_idx
.store_id
,mage_catalog_product_index_eav_idx
.value
,mage_catalog_product_index_eav_idx
.source_id
FROMmage_catalog_product_index_eav_idx
ON DUPLICATE KEY UPDATEentity_id
= VALUES(entity_id
),attribute_id
= VALUES(attribute_id
),store_id
= VALUES(store_id
),value
= VALUES(value
),source_id
= VALUES(source_id
)
Which if am correct states that i need the column source_id in catalog_product_index_eav_idx.source_id
, However, When i add this column in and set the value to 0 for each row (i created a test database to see and that filled all the values with 0) i then get this error when running the same command
SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1, query was: INSERT INTO
mage_catalog_product_index_eav_idx
SELECT DISTINCTpid
.entity_id
,pid
.attribute_id
,pid
.store_id
, IFNULL(pis.value, pid.value) ASvalue
FROM (SELECT DISTINCTs
.store_id
,s
.website_id
,dd
.attribute_id
, COALESCE(ds.value, dd.value) ASvalue
,cpe
.entity_id
FROMmage_store
ASs
LEFT JOINmage_catalog_product_entity_int
ASdd
ON dd.store_id = 0 LEFT JOINmage_catalog_product_entity_int
ASds
ON ds.store_id = s.store_id AND ds.attribute_id = dd.attribute_id AND ds.entity_id = dd.entity_id LEFT JOINmage_catalog_product_entity_int
ASd2d
ON d2d.store_id = 0 AND d2d.entity_id = dd.entity_id AND d2d.attribute_id = 94 LEFT JOINmage_catalog_product_entity_int
ASd2s
ON d2s.store_id = s.store_id AND d2s.attribute_id = d2d.attribute_id AND d2s.entity_id = d2d.entity_id LEFT JOINmage_catalog_product_entity
AScpe
ON cpe.entity_id = dd.entity_id WHERE (s.store_id != 0) AND ((ds.value IS NOT NULL OR dd.value IS NOT NULL)) AND (COALESCE(d2s.value, d2d.value) = 1)) ASpid
LEFT JOINmage_catalog_product_entity_int
ASpis
ON pis.entity_id = pid.entity_id AND pis.attribute_id = pid.attribute_id AND pis.store_id = pid.store_id WHERE (pid.attribute_id IN('136', '139', '149', '161', '167', '169', '170', '171', '231')) AND (IFNULL(pis.value, pid.value) IS NOT NULL) AND (NOT(pis.value IS NULL AND pis.value_id IS NOT NULL))
I have been trying to solve this issue for quite a while now but am not having any luck.
I think I need to replace the core code which is used for the re-indexer but i cannot seem to find this.
Any chance someone could point me in the right direction on where Magento stores these files or how to resolve the issue using a different method?