Hi Everyone,
I hope you can help me on this one as I am stuck here for a couple of days.
Here is what I have installed.
1) Magento ver. 2.4.2
2) Porto Theme
3) MageStore WebPOS
4) MagePlaza SMTP
5) Website migrated by one of the popular migration services.
When I click the "Send Email" button on Order/Invoice/Credit Memo etc, I get the following error in system.log
main.ERROR: Email template '' is not defined. [] []
I am not sure how to fix this.
Any help would be appreciated as I cannot launch our migrated site with these issues.
I am still experiencing this issue and after doing some digging, I see that this is the code that is causing throwing the exception.
vendor/magento/module-email/Model/Template/Config.php:225
protected function _getInfo($templateId, $fieldName)
{
$data = $this->_dataStorage->get();
if (!isset($data[$templateId])) {
throw new \UnexpectedValueException("Email template '{$templateId}' is not defined.");
}
if (!isset($data[$templateId][$fieldName])) {
throw new \UnexpectedValueException(
"Field '{$fieldName}' is not defined for email template '{$templateId}'."
);
}
return $data[$templateId][$fieldName];
}
Hey @HussainBaig,
Go to Store -> Setting -> Configuration
under the Sales Tab -> Sales Emails -> Credit memo section
Select Template for Credit Memo.
Create it if not exists from Marketing -> Communications -> Email Templates
Hi @HussainBaig,
The problem most likely comes from the SMTP module of Mageplaza. You can disable this module and try configure and send email using Magento's default function.
Hope this can help you! Let me know if you need further assistance.
_________
If issue solved, Click Kudos & Accept as Solution.
So basically what I had done was take backups of my full website before milestone (every time I installed something).
Therefore, I was able to determine that this issue is being caused by WebPOS. I have filed a ticket with Magestore WebPOS and they are looking at it.
As for Mageplaza SMTP, their developer was very helpful. I shadowed him for 2 days while he took control of my computer and tried to troubleshoot the issue. It was determined that it was not Mageplaza SMTP.
I will update this ticket when I have some news from Magestore WebPOS.
Regards,
Hussain
Magestore was able to determine the issue and provided me with a patch to fix this up.
Issue has been resolved.
Hi @HussainBaig,
Great to hear that!
If you need further assistance, please let me know.
I have the same error. Can you share the patch please?