Search code examples
magentoentity-attribute-value

Magento Backend > Product Attributes showing less attributes that it should


When in backend I can't see all custom attributes. Same occurs in frontend.

I selected EAV_ATTRIBUTE table and can see 179 product attributes (type = 4). But backend Product > Attributes shows only 119.

Anyone know what could be happening?

Magento Version: 1.7.0.2


Solution

  • IN the admin grid for attributes, the attribute collection is retrieved like this:

    $collection = Mage::getResourceModel('catalog/product_attribute_collection')
            ->addVisibleFilter(); 
    

    So not all the attributes that exist are listed in there. Only the ones marked as is_visible in the catalog_eav_attribute table.

    Try this select and see what you get.

    SELECT 
        * 
    FROM 
        eav_attribute e
        LEFT JOIN `catalog_eav_attribute` ce
            ON e.attribute_id = ce.attribute_id
    WHERE
        e.entity_type_id = 4 AND
        ce.is_visible = 1
    

    This should get you the attributes that are listed in the admin grid.