cancel
Showing results for 
Search instead for 
Did you mean: 

Importing Products & Indexer Failures...

Importing Products & Indexer Failures...

Hi all,

I´m new to this forum... We are running magento 1.6.2 and we are importing configurable / simple products via an own written script on the shell.

 

This is the main snippet from the script:

 $sProducts->reset()
                        ->setTypeId(Mage_Catalog_Model_Product_Type::TYPE_SIMPLE)
                        ->setWebsiteIds(array(1))
                        ->setStatus(Mage_Catalog_Model_Product_Status::STATUS_ENABLED)
                        ->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE)
                        ->setTaxClassId(1)
                        ->setAttributeSetId($sProducts->getDefaultAttributeSetId())
                        ->setSku($prod["sku"])
                        ->setName($prod["name"])
                        ->setShortDescription($prod["description"])
                        ->setDescription($prod["description"])
                        ->setPrice($prod["price"])
                        ->setColor($attributeModels["color"]->getSource()->getOptionId($prod["color"]))
                        ->setData($attr, $configurableAttributeOptionId)
                        ->setStockData(array("is_in_stock" => $prod["is_in_stock"], "qty" => 0))
                        ->setWeight($prod["weight"])
                        ->seturlkey($prod["url_key"])
                        ->setNewsFromDate($prod["news_from_date"])
                        ->setNewsToDate($prod["news_to_date"])
                        ->setEan($prod["ean"])
                        ->setDeliveryTime($prod["delivery_time"]);
        

        $sProducts->save();

 This worked great, but now, if suddenly stopped working. We have noticed, that our indexer is also not running properly.

 

We suddenly get this error message in the log file:

Unknown column 'main_table.data' in 'field list'

 

After tracking down the errors, I found out, that it is this SQL, which causes the error:

SELECT `main_table`.`data`, `main_table`.`lifetime`, `main_table`.`expire`, `main_table`.`priority`, `additional_table`.*, `entity_attribute`.*, IFNULL(al.value, main_table.frontend_label) AS `store_label` FROM `eav_attribute` AS `main_table`
 INNER JOIN `catalog_eav_attribute` AS `additional_table` ON additional_table.attribute_id = main_table.attribute_id
 INNER JOIN `eav_entity_attribute` AS `entity_attribute` ON entity_attribute.attribute_id = main_table.attribute_id
 LEFT JOIN `eav_attribute_label` AS `al` ON al.attribute_id = main_table.attribute_id AND al.store_id = 0 WHERE (main_table.entity_type_id = 10) AND (entity_attribute.attribute_set_id = '9') ORDER BY sort_order ASC

 

There is no data, lifetime, expire or priority in the eav_attribute table.

 

The same error occours if the indexer is running from shell... Indexer running from magento backend does NOT show any errors...

 

I hope someone could help me out, this is a mess...

 

Greetings

Nils

 

1 REPLY 1

Re: Importing Products & Indexer Failures...

Hi @NilsHansen 

 

Off the top of my head, it seems like some of the cache and indexers have been mixed up some how, since I can't really remember anywhere else where those three keywords (data, lifetime and expire), would apear otherwise.

 

I haven't ever enconterede the error before myself.