I recently started monitoring the logs on my magento installation (version 1.9.1). I noticed an error recurring and strangely it originates from a core Mage class - specifically Mage_Catalog_Model_Resource_Category_Flat class on line 1391.

The code builds a Select object where it adds a field main_table.custom_design_apply from a table which resolves to catalog_category_flat_store_1. Now here is the problem, I tried inspecting that table and discovered that field really does not exist. The code below shows more for the construct.

$select = $this->_getReadAdapter()->select()
            array('main_table' => $this->getMainStoreTable($category->getStoreId())),
                'main_table.custom_design_apply', //<-- the strange field
        ->where('main_table.entity_id IN (?)', $pathIds)
        ->where('main_table.is_active = ?', '1')
        ->order('main_table.path ' . Varien_Db_Select::SQL_DESC);
    $result = $this->_getReadAdapter()->fetchAll($select);//here is line 1391

I am stuck between overriding the class and removing the field or add the column manually in the table. Nonetheless, why would this be. Is it a bug on Mage's side or I am not getting the whole picture.


Looks like it's dead code. I tried to search in magento for this attribute and found that at one moment exists such attribute and in one version this attribute was removed.


I think you may completely remove this row.

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.