Jump to content
thirty bees forum

Question

Posted

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

9 answers to this question

Recommended Posts

  • 0
Posted

I am not completly sure about it, but we have done the same as Havouza. Just putting a big number there instead of 0... Please write if it works for you as well. If this solves your problem, then it's a bug...

  • 0
Posted

There is nothing that says that a 0 means unlimited. It say Max size of short description and the note say set max characters for the short description

  • 0
Posted

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.

  • 0
Posted

@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;
}

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...