You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a commerce order has a email template + order pdf attached, the empty field "Order PDF Filename Format" / field id: fileNameFormat generates the following error when trying to send the order mails:
craft\web\View::renderObjectTemplate(): Argument #1 ($template) must be of type string, null given, called in /app/vendor/craftcms/commerce/src/services/Emails.php on line 694
Steps to reproduce
place an order
use html email template
attach order pdf to it
set pdf name, handle + path but leave fileNameFormat field empty
Expected behavior
As in craftcms/commerce/src/services/email.php line 696 -> $fileName = $pdf->handle . '-' . $order->number; fallback if !filename, the pdf's handle + ordernumber should be set as filename.
Actual behavior
the queue job runs into a timeout and emails (+ pdf attachments) are not sent.
What happened?
Description
If a commerce order has a email template + order pdf attached, the empty field "Order PDF Filename Format" / field id: fileNameFormat generates the following error when trying to send the order mails:
craft\web\View::renderObjectTemplate(): Argument #1 ($template) must be of type string, null given, called in /app/vendor/craftcms/commerce/src/services/Emails.php on line 694
Steps to reproduce
Expected behavior
As in craftcms/commerce/src/services/email.php line 696 ->
$fileName = $pdf->handle . '-' . $order->number;
fallback if !filename, the pdf's handle + ordernumber should be set as filename.Actual behavior
the queue job runs into a timeout and emails (+ pdf attachments) are not sent.
code: https://share.cleanshot.com/79TCrNFL
actual issue / timeout queue: https://share.cleanshot.com/KyfxJCf2
queue error: https://share.cleanshot.com/rq0G7KDv
Not having the issue if providing a nameformat for the pdf.
Would it be possible to make it a required field?
Craft CMS version
4.5.7
Craft Commerce version
4.3.1
PHP version
8.2
Operating system and version
bento/debian-11
Database type and version
mysql 8.0
Image driver and version
No response
Installed plugins and versions
No response
The text was updated successfully, but these errors were encountered: