After enable the use_flat_Catalog_category option in admin catalog , and i did reindex, then catalog_category_flat_store_1 table was create.

And then when i try to launch the store, it's show below SQL error

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'main_table.thumbnail' in 'field list', query was: SELECT `main_table`.`entity_id`, `main_table`.`level`, `main_table`.`path`, `main_table`.`position`, `main_table`.`is_active`, `main_table`.`is_anchor`, `main_table`.`name`, `main_table`.`url_key`, `main_table`.`thumbnail`, `main_table`.`cattop_thumb` FROM `tt_catalog_category_flat_store_1` AS `main_table` WHERE (is_active = '1') AND (catslider = '1') ORDER BY name ASC

because catalog flat table does not have thumbnail column.

And i understand that catalog_flat_table column are created based on below sql query

SELECT `tt_eav_attribute`.* FROM `tt_eav_entity_type` INNER JOIN `tt_eav_attribute` ON tt_eav_attribute.entity_type_id = tt_eav_entity_type.entity_type_id WHERE  (tt_eav_entity_type.entity_type_code = 'catalog_category')

even this query also does not have attribute name like 'thumbnail'

  • Have you rebuilt the flat catalog indexes? – Yiorgos Moschovitis Aug 27 '15 at 16:17
  • What does SHOW COLUMNS FROM tt_catalog_category_flat_store_1 show you? – Fabian Schmengler Aug 28 '15 at 6:30
  • Thanks fschmengler, i found and correct the problem, it because of my Installed theme mistake. – Syed Diwan Aug 28 '15 at 14:18
  • Feel free to add your solution as an answer and accept it, so that this does not count as unanswered anymore – Fabian Schmengler Dec 18 '15 at 15:22

Attributes of the media type like thumbnail are always included in the flat index (unlike other attributes where it depends on the "Use in product listing" setting).

So since you just enabled the flat index for the first time, this probably means that it has not been built correctly. Go to System > Index Management in the admin panel and rebuild the index.

If that does not help, try to flush the DDL cache with the following PHP script (burn after executing):

require 'app/Mage.php';
  • Thanks fschmengler, I have found the problem, "thumbnail" is not core magento property for catalog_category. Because it was created from my installed theme. – Syed Diwan Aug 28 '15 at 9:24
  • Oh, I totally missed the fact that you were talking about the category flat index, not the product flat index. – Fabian Schmengler Aug 28 '15 at 9:25

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.