Jump to content

How to increase the characters field of META tags?


softbeach

Recommended Posts

You need to modify the ps_product_lang and ps_category_lang tables in your database and increase the size of the meta fields from varchar(128) to however many characters you want to use. Please note that Google only displays the first 160 characters of a metadescription. You'll also need to modify the $fieldSizeLang variable on line 186 of classes/Product.php and line 64 of classes/Category.php and increase the size from 128 to whatever number you put in the database.

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
You need to modify the ps_product_lang and ps_category_lang tables in your database and increase the size of the meta fields from varchar(128) to however many characters you want to use. Please note that Google only displays the first 160 characters of a metadescription. You'll also need to modify the $fieldSizeLang variable on line 186 of classes/Product.php and line 64 of classes/Category.php and increase the size from 128 to whatever number you put in the database.


Hi,

I am trying to modify just how you say.
I am facing a little trouble in the classes/Category.php file, line 64 I have:
protected     $fieldsSizeLang = array('name' => 64, 'link_rewrite' => 64, 'meta_title' => 128, 'meta_description' => 128, 'meta_description' => 128);


the size for name filed is not the same as in the ps_categoy_lang table (64 versus 128)
same for link_rewrite. I am a bit confused ...

and there is 2 meta_description but no meta_keywords in this line ...

What should I do ?

Thanks for your help

Link to comment
Share on other sites


and there is 2 meta_description but no meta_keywords in this line ...


I would also like to know if this duplicate is a bug in Category.php line 64 vers. 1.2.5, and what is the form of the corrected line in order to correctly modify the length of the meta_description field.

Thank you,
Link to comment
Share on other sites

This is how I did it, and it works but I still need a confirmation:

protected     $fieldsSizeLang = array('name' => 64, 'link_rewrite' => 64, 'meta_title' => 128, 'meta_description' => 254, 'meta_keywords' => 254);



Thank you,

Link to comment
Share on other sites

Hi,
I tested to change the value of the meta_keywords field in the database (changed to 255), without changing the category.php file.
It seems to work well. No errors and I can use 255 characters in the meta field.

But I would like to know if there may be a possible problem ??

Link to comment
Share on other sites

  • 3 years later...
You need to modify the ps_product_lang and ps_category_lang tables in your database and increase the size of the meta fields from varchar(128) to however many characters you want to use. Please note that Google only displays the first 160 characters of a metadescription. You'll also need to modify the $fieldSizeLang variable on line 186 of classes/Product.php and line 64 of classes/Category.php and increase the size from 128 to whatever number you put in the database.

I did This on version 1.5.4.1 and it worked perfectly. Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...