Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Won't Fix
-
Affects Version/s: 5.0.4, 5.1.0-b2
-
Component/s: Staff Interface
-
Labels:None
Description
When creating many configurable options a database error occurs:
[2021-06-22T19:49:04.921860+00:00] general.ERROR: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'period' cannot be null in /home/demo/public_html/vendors/minphp/db/src/PdoConnection.php:196 Stack trace: #0 /home/demo/public_html/vendors/minphp/db/src/PdoConnection.php(196): PDOStatement->execute(Array) #1 /home/demo/public_html/vendors/minphp/record/src/Record.php(328): Minphp\Db\PdoConnection->query('UPDATE `pricing...', Array) #2 /home/demo/public_html/app/models/pricings.php(132): Minphp\Record\Record->update('pricings', Array, Array) #3 /home/demo/public_html/app/models/package_options.php(707): Pricings->edit('123', Array) #4 /home/demo/public_html/app/models/package_options.php(673): PackageOptions->addOptionPricing('16', '1', Array) #5 /home/demo/public_html/app/models/package_options.php(466): PackageOptions->addOptionValues('1', '1', Array, 'select') #6 /home/demo/public_html/app/controllers/admin_package_options.php(243): PackageOptions->edit('1', Array) #7 /home/demo/public_html/vendors/minphp/bridge/src/Lib/Dispatcher.php(142): AdminPackageOptions->edit() #8 /home/demo/public_html/index.php(21): Dispatcher::dispatch('/admin/package_...') #9
{main}I did not test this on 5.1.0-b2, but I suspect it will still be an issue.
To reproduce, create a config option of the type drop-down. In our testing, the issue occurs at the 17th drop down option. See attached screenshot for configuration, it shows the first option, just do the same thing for each item incrementing the value of the option for each one. Save after 16, then try adding a 17th, the error then occurs.
This happens only when php max_input_vars is exceeded. It is a configuration issue.