We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

How to increase limit of 'decimal' field in expressionengine

How Do I?

chesterblack's avatar
chesterblack
5 posts
5 years ago
chesterblack's avatar chesterblack

I’ve got a Text Input field with ‘Allowed Content’ set to ‘Decimal’. It won’t let me set it to anything over a million on an entry, giving the error number_exceeds_limit.

I’ve thought about saving it as a string rather than use the decimal content type but I need to display them in order using orderby on the field and if it is a string it will treat 9 and being greater than 100 since 9 is greater than 1.

Is there a way to either increase or get around the million limit?

Expressionengine version 3.5.2 in case it’s relevant.

       
meatpaste's avatar
meatpaste
16 posts
5 years ago
meatpaste's avatar meatpaste

You would need to edit the logic in cp/ee/EllisLab/Addons/text/ft.text.php (line 62 in 5.1.2) and also edit the column type in the DB structure (I just tried this locally setting the field length to ‘20,4’ instead of ‘10,4’.

It is probably worth raising an issue about this on the EE github as that limit seems restrictive to me (mySQL supports 65 digits). https://github.com/ExpressionEngine/ExpressionEngine/issues

       
chesterblack's avatar
chesterblack
5 posts
5 years ago
chesterblack's avatar chesterblack

That worked for me too, thanks very much!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.