postnl/postnl-magento2

[BUG] Undefined variable $returnLabels

Closed this issue · 1 comments

To Reproduce
Steps to reproduce the behavior:
Generate a label and email from the admin.

Expected result
An email being send.

Actual result
An error in the logs.

[2024-03-13T09:52:38.207589+00:00] main.CRITICAL: Exception: Warning: Undefined variable $returnLabels in /home/svc-mcf_prod/releases/70d27cb6/vendor/tig/postnl-magento2/Controller/Adminhtml/Order/Email.php on line 122 in /home/svc-mcf_prod/releases/70d27cb6/vendor/magento/framework/App/ErrorHandler.php:62
Stack trace:
#0 /home/svc-mcf_prod/releases/70d27cb6/vendor/tig/postnl-magento2/Controller/Adminhtml/Order/Email.php(122): Magento\Framework\App\ErrorHandler->handler()
#1 /home/svc-mcf_prod/releases/70d27cb6/vendor/tig/postnl-magento2/Controller/Adminhtml/Order/Email.php(72): TIG\PostNL\Controller\Adminhtml\Order\Email->getLabel()
#2 /home/svc-mcf_prod/releases/70d27cb6/vendor/tig/postnl-magento2/Controller/Adminhtml/Shipment/MassGetSmartReturnLabel.php(115): TIG\PostNL\Controller\Adminhtml\Order\Email->sendEmail()

Workaround
Describe the temporarily workaround or if none exists write "None"

Screenshots
If applicable, add screenshots to help explain your problem.

** Please complete the following information**

  • Magento version: 2.4.6-p4
  • PHP version: 8.2
  • TIG PostNL version: 1.13.1

Hi @evs-xsarus, last Monday we released a new version of our plug-in which contains a fix for Smart Return e-mails. We suggest trying the update (on a staging environment) to see if this solves this issue. If it does not, please fill in the support form at the link below so our support team can analyse the issue and forward the results to our development team for future development.

Kind Regards
Joris
PostNL Support