Using OC 3.02. In the admin, Pages (Information) titles have a character limit of 64 (at least that's what the error message says, I think it is actually less based on testing). Is there a good reason for this? If not, is there a simple way to increase that limit? I am working with a client that does a lot of seminars and the titles seem to run closer to 80 characters pretty regularly.
This is done for Search Engine purposes. The most a search engine will display as the title in search results is ~64 characters.
However, if you need to up the count, you can do the following:
Run an SQL command on your database to increase the characters from 64 to 255 (the max for a VARCHAR field)
Edit admin/controller/catalog/information.php
find:
Change to:
Edit: admin/language/en-gb/catalog/information.php
find:
Change to:
However, if you need to up the count, you can do the following:
Run an SQL command on your database to increase the characters from 64 to 255 (the max for a VARCHAR field)
Code: Select all
ALTER TABLE `oc_information_description` CHANGE `title` `title` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
find:
Code: Select all
if ((utf8_strlen($value['title']) < 1) || (utf8_strlen($value['title']) > 64)) {
Code: Select all
if ((utf8_strlen($value['title']) < 1) || (utf8_strlen($value['title']) > 255)) {
find:
Code: Select all
$_['error_title'] = 'Information Title must be between 1 and 64 characters!';
Code: Select all
$_['error_title'] = 'Information Title must be between 1 and 255 characters!';
Perfect! Thank you very much. Just saved me a bunch of digging. I had just opened the DB when your message came in! 

uksitebuilder wrote: ↑Sat Feb 10, 2018 4:51 amThis is done for Search Engine purposes. The most a search engine will display as the title in search results is ~64 characters.
However, if you need to up the count, you can do the following:
Run an SQL command on your database to increase the characters from 64 to 255 (the max for a VARCHAR field)
Edit admin/controller/catalog/information.phpCode: Select all
ALTER TABLE `oc_information_description` CHANGE `title` `title` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
find:Change to:Code: Select all
if ((utf8_strlen($value['title']) < 1) || (utf8_strlen($value['title']) > 64)) {
Edit: admin/language/en-gb/catalog/information.phpCode: Select all
if ((utf8_strlen($value['title']) < 1) || (utf8_strlen($value['title']) > 255)) {
find:Change to:Code: Select all
$_['error_title'] = 'Information Title must be between 1 and 64 characters!';
Code: Select all
$_['error_title'] = 'Information Title must be between 1 and 255 characters!';
Then why is meta_title VARCHAR 255?This is done for Search Engine purposes. The most a search engine will display as the title in search results is ~64 characters.
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
Who is online
Users browsing this forum: No registered users and 44 guests