Skip to content

Error when sending sales mails in async mode if product was removed #26876

Closed
@ilnytskyi

Description

@ilnytskyi

Preconditions (*)

  1. magento 2.3.1+

Steps to reproduce (*)

  1. Set up async mails sending
  2. Buy a product, create order, invoice or shipment
  3. Send sales mails
  4. Remove product (along with configurable(parent) product)
  5. Try to resend sales email (e.g. set column email_sent to Null in relative tables)
  6. or try to send invoice/shipment again
    Selection_375

Expected result (*)

  1. Emails are send
  2. If there are newer sales items planned to send (email_sent is null) emails will be sent
  3. Job code shows warning or problem item is ignored but newer items are sent

Actual result (*)

  1. Emails are not sent
  2. If there are newer sales items planned to send (email_sent is null) emails will not be sent; It leads that sales async mailing stop working
    Selection_374
  3. in var/log/cron.log this log appears
[2020-02-14 12:41:09] main.ERROR: Cron Job sales_send_order_invoice_emails has an error: Call to a member function getData() on null. Statistics: {"sum":0,"count":1,"realmem":0,"emalloc":0,"realmem_start":73400320,"emalloc_start":36940360} [] []
[2020-02-14 12:41:09] main.CRITICAL: Error when running a cron job {"exception":"[object] (RuntimeException(code: 0): Error when running a cron job at /var/www/html/vendor/magento/module-cron/Observer/ProcessCronQueueObserver.php:327, Error(code: 0): Call to a member function getData() on null at /var/www/html/vendor/magento/module-catalog/Helper/Image.php:502)"} []

  1. Newer items are blocked to send

Metadata

Metadata

Assignees

Labels

Component: CatalogComponent: EmailComponent: MailComponent: SalesFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneReported on 2.3.1Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S1Affects critical data or functionality and forces users to employ a workaround.Triage: DoneHas been reviewed and prioritized during Triage with Product Managers

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions