Category thumbnail missing from Magento

6 May 2015| Post by Graham

AuthorGraham

I’m not sure from which version of Magento this started happening but it seems the “Thumbnail Image” attribute has disappeared for Categories in the admin system.

Thankfully this is a quick fix, firstly navigate to : app/etc/modules/Mage_XmlConnect.xml, then ensure that the following line is changed to be from :

[cc lang=”xml”] false
[/cc]

To be :

[cc lang=”xml”] true
[/cc]

It does seem strange that this attribute doesn’t get created if this module is disabled by default, so I decided to investigate this a little more thoroughly.

I found the following code in app/code/core/Mage/XmlConnect/sql/xmlconnect_setup/install-1.6.0.0.php on line 176 :

[cc lang=”php”] $installer->addAttribute(‘catalog_category’, ‘thumbnail’, array(
‘type’ => ‘varchar’,
‘label’ => ‘Thumbnail Image’,
‘input’ => ‘image’,
‘backend’ => ‘catalog/category_attribute_backend_image’,
‘required’ => false,
‘sort_order’ => 4,
‘global’ => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
‘group’ => ‘General Information’
));
[/cc]

So it’s true, the “Thumbnail Image” attribute being installed is dependent on the XmlConnect module being enabled by default. This seems to me that it was potentially something that one of the Magento developers forgot about and has bundled in at a later date, if anyone can shed any further light then please leave a comment.

Scroll