Question

Since the meta_description attribute has a varchar backend type, the input is limited to 255. However nowadays Google supports longer meta description.

If the backend type of meta_description is changed from varchar to text, the descriptions will no longer be stored in catalog_product_entity_varchar, but catalog_product_entity_text instead. Will this have any negative side effects? Should the old meta descriptions be imported into catalog_product_entity_text and removed from catalog_product_entity_varchar?

Was it helpful?

Solution

Should the old meta descriptions be imported into catalog_product_entity_text and removed from catalog_product_entity_varchar?

Yes, I think so (not testet, but I doubt that magento moves them on his own) ... Update script could look like this: Magento attribute change backend_type from varchar to text (or you use insertFromSelect() method).

However nowadays Google supports longer meta description.

In the past google showed up to 170 chars, now it's up 300 for desktop and 200 for mobiles, so I would not change it to more then 200, but this is really opinion-based.

If you change the length, do not forget to also change frontend class for products and categories otherwise your are not able to save longer descriptions from backend.

UPDATE eav_attribute SET frontend_class = 'validate-length maximum-length-XXX' WHERE attribute_code = 'meta_description';
UPDATE eav_attribute SET note = 'Maximum XXX chars' WHERE attribute_code = 'meta_description';
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top