Description
Preconditions (*)
- Magento version: 2.4.0
- Configured cron for running message queue consumers.
Steps to reproduce (*)
- On the product grid in the backend perform massaction to update attribute values for couple products ("check" products and select "Update Attributes" action from "Actions" dropdown).
- Set values for needed attributes or/and assign products to websites and save.
- After the page reloads will be displayed a message like "Task "Update attributes for N selected products": 1 item(s) have been scheduled for an update."
- Wait some time and reload the backend page.
Expected result (*)
- Displayed messages like "1 item(s) have been successfully updated...".
- Attribute values for related products updated.
- In DB new record in "magento_bulk" and new record(s) in "magento_operation" table (operations related to the bulk).
- New record(s) in the "queue_message" (related to the queues "product_action_attribute.update" and/or product_action_attribute.website.update) and new related record(s) in the "queue_message_status" table with status "4".
Actual result (*)
- In system messages still displayed a message like "Task "Update attributes for N selected products": 1 item(s) have been scheduled for an update."
- Attribute values for the products updated.
- A new record in "message_bulk" table but no related record(s) in "magento_operation" table.
- New related records in "queue_message" and "queue_message_status" tables but records in the last table with error stauts (status value "6").
- In magento system.logs added string with error: main.CRITICAL: Message has been rejected: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'operation_key' cannot be null, query was: INSERT INTO
magento_operation
(id
,bulk_uuid
,topic_name
,serialized_data
,result_serialized_data
,status
,error_code
,result_message
,operation_key
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [] []
During debugging I found out that since Magento 2.4.0 version into "magento_operation" table was added new required (not nullable) column 'operation_key'. But neither controller action which schedules updated product attributes update bulk (\Magento\Catalog\Controller\Adminhtml\Product\Action\Attribute\Save::publish()) nor consumer which executes related messages and updates bulk status(\Magento\Catalog\Model\Attribute\Backend\Consumer::process()) does setting "operation_key" value into related operation. And during an attempt to save operation in the consumer (app/code/Magento/Catalog/Model/Attribute/Backend/Consumer.php:140) trows exception. As result operation is not saved and the status of the reladed message in the "queue_message_status" saved with value "6".
Also, the same problem for code that pushes/handles bulks related to the "media.storage.catalog.image.resize" queue.
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status