Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ilnytskyi opened this issue Feb 14, 2020 · 3 comments · Fixed by #26877
Closed

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

ilnytskyi opened this issue Feb 14, 2020 · 3 comments · Fixed by #26877
Assignees
Labels
Component: Catalog Component: Email Component: Mail Component: Sales Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: done Reported on 2.3.1 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S1 Affects critical data or functionality and forces users to employ a workaround. Triage: Done Has been reviewed and prioritized during Triage with Product Managers

Comments

@ilnytskyi
Copy link
Contributor

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
@m2-assistant
Copy link

m2-assistant bot commented Feb 14, 2020

Hi @ilnytskyi. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

@ilnytskyi do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Feb 14, 2020
@ghost ghost assigned ilnytskyi Feb 14, 2020
@sudheers-kensium sudheers-kensium added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch labels Feb 26, 2020
@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Feb 26, 2020
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @sudheers-kensium
Thank you for verifying the issue. Based on the provided information internal tickets MC-31919 were created

Issue Available: @sudheers-kensium, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@sdzhepa sdzhepa added Triage: Ready for Triage Issue is ready to me triaged with Product Manager Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Severity: S1 Affects critical data or functionality and forces users to employ a workaround. Triage: Done Has been reviewed and prioritized during Triage with Product Managers and removed Triage: Ready for Triage Issue is ready to me triaged with Product Manager labels Apr 30, 2020
@magento-engcom-team magento-engcom-team added the Fixed in 2.4.x The issue has been fixed in 2.4-develop branch label Sep 10, 2020
@magento-engcom-team
Copy link
Contributor

Hi @ilnytskyi. Thank you for your report.
The issue has been fixed in #26877 by @ilnytskyi in 2.4-develop branch
Related commit(s):

The fix will be available with the upcoming 2.4.2 release.

@magento-engcom-team magento-engcom-team added the Reported on 2.3.1 Indicates original Magento version for the Issue report. label Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Catalog Component: Email Component: Mail Component: Sales Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: done Reported on 2.3.1 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S1 Affects critical data or functionality and forces users to employ a workaround. Triage: Done Has been reviewed and prioritized during Triage with Product Managers
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants