What happened?
Description
Related discussion: #16873
Setting the Max Authors option in a section to a very large number like 100,000 results in an uncaught error thrown by MySQL:
SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'maxAuthors' at row 1
The SQL being executed was: UPDATE bl_sections SET maxAuthors=100000, dateUpdated='2025-03-12 11:26:48' WHERE id=11
That's because the database column for this setting is a SMALLINT (in MySQL at least).
Steps to reproduce
- In a section, set the
Max Authors to 100000 and save.
Expected behavior
- The input should have
type="number" and have min and max attributes that correspond to the acceptable range for this setting.
- Out-of-bounds-errors should be caught server-side and show an error message, instead of displaying an uncaught exception screen.
Actual behavior
Saving the section shows an uncaught exception, and doesn't inform me what went wrong or what the maximum accepted value is.
Craft CMS version
5.6.11
PHP version
8.3
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
What happened?
Description
Related discussion: #16873
Setting the
Max Authorsoption in a section to a very large number like 100,000 results in an uncaught error thrown by MySQL:That's because the database column for this setting is a SMALLINT (in MySQL at least).
Steps to reproduce
Max Authorsto 100000 and save.Expected behavior
type="number"and haveminandmaxattributes that correspond to the acceptable range for this setting.Actual behavior
Saving the section shows an uncaught exception, and doesn't inform me what went wrong or what the maximum accepted value is.
Craft CMS version
5.6.11
PHP version
8.3
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions