Site breaking when price field is provided the out of range values

Created on 19 June 2024, 9 days ago

Site breaking when price field is provided the out of range values

1. Create a product and add price in the variation '99999999999999'
2. Now save the product
3. Site will give below error

Drupal\Core\Entity\EntityStorageException: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'price__number' at row 1: INSERT INTO "commerce_product_variation_field_data" ("variation_id", "type", "langcode", "uid", "status", "product_id", "sku", "title", "list_price__number", "list_price__currency_code", "price__number", "price__currency_code", "created", "changed", "default_langcode") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12, :db_insert_placeholder_13, :db_insert_placeholder_14); Array ( [:db_insert_placeholder_0] => 2 [:db_insert_placeholder_1] => event_registration [:db_insert_placeholder_2] => en [:db_insert_placeholder_3] => 1 [:db_insert_placeholder_4] => 1 [:db_insert_placeholder_5] => 2 [:db_insert_placeholder_6] => 56667hghgv [:db_insert_placeholder_7] => Demo Event on Healthcare [:db_insert_placeholder_8] => [:db_insert_placeholder_9] => [:db_insert_placeholder_10] => 99999999999999 [:db_insert_placeholder_11] => JPY [:db_insert_placeholder_12] => 1718688095 [:db_insert_placeholder_13] => 1718788212 [:db_insert_placeholder_14] => 1 ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 817 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

🐛 Bug report
Status

Active

Version

2.39

Component

Price

Created by

🇮🇳India Deepesh151086

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024