Post by MarcPinnell » Sat Feb 10, 2018 3:18 am

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.

New member

Posts

Joined
Wed Jul 26, 2017 1:12 am

Post by uksitebuilder » Sat Feb 10, 2018 4:51 am

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)

Code: Select all

ALTER TABLE `oc_information_description` CHANGE `title` `title` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
Edit admin/controller/catalog/information.php

find:

Code: Select all

if ((utf8_strlen($value['title']) < 1) || (utf8_strlen($value['title']) > 64)) {
Change to:

Code: Select all

if ((utf8_strlen($value['title']) < 1) || (utf8_strlen($value['title']) > 255)) {
Edit: admin/language/en-gb/catalog/information.php

find:

Code: Select all

$_['error_title']            = 'Information Title must be between 1 and 64 characters!';
Change to:

Code: Select all

$_['error_title']            = 'Information Title must be between 1 and 255 characters!';

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by MarcPinnell » Sat Feb 10, 2018 5:09 am

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 am
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)

Code: Select all

ALTER TABLE `oc_information_description` CHANGE `title` `title` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
Edit admin/controller/catalog/information.php

find:

Code: Select all

if ((utf8_strlen($value['title']) < 1) || (utf8_strlen($value['title']) > 64)) {
Change to:

Code: Select all

if ((utf8_strlen($value['title']) < 1) || (utf8_strlen($value['title']) > 255)) {
Edit: admin/language/en-gb/catalog/information.php

find:

Code: Select all

$_['error_title']            = 'Information Title must be between 1 and 64 characters!';
Change to:

Code: Select all

$_['error_title']            = 'Information Title must be between 1 and 255 characters!';

New member

Posts

Joined
Wed Jul 26, 2017 1:12 am

Post by egmajo » Tue Nov 19, 2019 5:33 pm

This works!!
But in my case it works at my secondary languages,
In my main language I get ...

Newbie

Posts

Joined
Mon Mar 27, 2017 10:51 pm

Post by letxobnav » Tue Nov 19, 2019 5:47 pm

This is done for Search Engine purposes. The most a search engine will display as the title in search results is ~64 characters.
Then why is meta_title VARCHAR 255?

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.


User avatar
Active Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan
Who is online

Users browsing this forum: thekrotek and 35 guests