Skip to content

Fix Cron Error When Product Has Been Deleted #892

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sprankhub
Copy link

  • The code is working on a plain Magento 2 installation.
  • The code follows the PSR-2 code style.
  • When an exception or error is logged the message is accompanied with some context, eg: Error when trying to get the payment status:
  • Contains tests for the changed/added code (great if so but not required).
  • I have added a scenario to test my changes.

This PR touches code in the following areas (Check what is applicable):

Frontend

  • Shopping cart
  • Checkout
  • Totals
  • Payment methods

Backend

  • Configuration
  • Order grid
  • Order view
  • Invoice view
  • Credit memo view
  • Shipment view
  • Email sending

Order Processing (Mollie communication)

  • Creating the order
  • Invoicing the order
  • Shipping the order
  • Refunding (credit memo) the order

Other
Second Chance Email

Please describe the bug/feature/etc this PR contains:

The following cronjob failed:

Job	mollie_send_pending_payment_reminders
Messages	Error when running a cron job: Call to a member function isSaleable() on null
Executed at	2025-05-02 09:00:09

Scenario to test this code:

  1. Configure second chance email.
  2. Cancel order payment.
  3. Delete ordered product.
  4. Wait for second chance email cronjob.
  5. Observe above error.

@Frank-Magmodules
Copy link
Collaborator

Thanks as always for your PR and contribution, @sprankhub!
We’ll review it shortly and include it in the next release if approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants