Closed
Description
Preconditions (*)
- Magento 2.4.4 prerelease
- PHP 8.1
- Magento with prefix in DB
Steps to reproduce (*)
1.Create new source
2.Create new stock and assign for new source
4. Going to: Catalog-->Product--> Open random product, Assigning for new Source, add Q-ty
5. Push the Save button
Expected result (*)
- Success after save wtihout error, and seeing on the Products Greed Q-ty >0 in column Stock
Actual result (*)
- SQL Error and on the Products Grid in column Stock=0 and not displaying on FrontArea:
https://imgur.com/a/Mj7vS0x https://imgur.com/a/POWJtKH
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'docker_mg244eegolaya.pref_reservations_temp_for_stock_2' doesn't exist, query was: SELECTsource_item
.sku
, SUM(IF(source_item.status = 0, 0, source_item.quantity)) ASquantity
, IF((reservations.reservation_qty IS NULL OR (SUM(source_item.quantity) + reservations.reservation_qty) > 0) AND (((legacy_stock_item.use_config_backorders = 0 AND legacy_stock_item.backorders <> 0) AND (legacy_stock_item.min_qty >= 0 OR legacy_stock_item.qty > legacy_stock_item.min_qty) AND SUM(IF(source_item.status = 0, 0, 1))) OR ((legacy_stock_item.use_config_manage_stock = 0 AND legacy_stock_item.manage_stock = 0)) OR ((legacy_stock_item.use_config_min_qty = 1 AND SUM(IF(source_item.status = 0, 0, source_item.quantity)) > 0) OR (legacy_stock_item.use_config_min_qty = 0 AND SUM(IF(source_item.status = 0, 0, source_item.quantity)) > legacy_stock_item.min_qty)) OR (product.sku IS NULL)), 1, 0) ASis_salable
FROMpref_inventory_source_item
ASsource_item
LEFT JOINpref_catalog_product_entity
ASproduct
ON product.sku = source_item.sku AND (product.created_in <= 1 AND product.updated_in > 1) LEFT JOINpref_cataloginventory_stock_item
ASlegacy_stock_item
ON product.entity_id = legacy_stock_item.product_id LEFT JOINpref_reservations_temp_for_stock_2
ASreservations
ON source_item.sku = reservations.sku WHERE (source_item.source_code IN ('a2')) AND (source_item.sku IN ('24-MB01')) GROUP BYsource_item
.sku
Severity (*) S0
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done