Jump to content
thirty bees forum
  • 0

Short Description Max 400


ajensen27

Question

Have the short description max characters set to 0 in admin but I'm still getting an error message when trying to go over 400. Am I missing something or is this a bug?

This description_short field (English (English)) is too long: 400 chars max (current count 438).

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

In the database table (tbproductlang) both [description] and [description_short] are of TEXT type which allows up to 65,535 characters.

You should be able to set the limit to anything up to ~65,530 if you wish. It goes without saying of course that actually using such a long "short" description would wreak havoc with most templates.

Link to comment
Share on other sites

  • 0

@mdekker said in Short Description Max 400:

Interesting, I found this limit: https://github.com/thirtybees/thirtybees/blob/1.0.1/controllers/admin/AdminProductsController.php#L1913-L1917

Even if the description is configured to be more than 400, it will reset to 400.

The original idea was to allow only 400 characters and it strips the HTML characters before counting, so basically the other 65,130 characters are reserved for any HTML you would like to add to the short description. Seems like overkill to me.

I don't use PHP regularly and I'm pretty terrible at hacking my way around it when necessary but doesn't that section (specifically lines 1915-1917) set the limit to be 400 if the limit is defined as less than or equal to zero?

if ($limit <= 0) {
    $limit = 400;
}
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...