Prestashop: Missing '$template' parameter on emails

Created on 26 Feb 2020  ·  15Comments  ·  Source: PrestaShop/PrestaShop

Using the following to send an email (and all parameters are valid)

$file_attachement = null; Mail::Send( (int)$email_order->id_lang, 'order_conf', Mail::l('Order confirmation', (int)$email_order->id_lang), null, $email_customer->email, $email_customer->firstname.' '.$email_customer->lastname, null, null, $file_attachement, null, _PS_MAIL_DIR_, false, (int)$email_order->id_shop );

I get Missing '$template' parameter here smarty_internal_templatebase.php on line 177

Using the default theme, the email template is there

Bug Email No change required

Most helpful comment

i have the same issue im using V: 1.7.5.1
Version de PHP : 7.2.28
theme : warehouse
PHP Fatal error: Uncaught --> Smarty: 0():Missing '$template' parameter <--
thrown in public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php on line 177

and i can't figure out, any idea please

All 15 comments

Hi @thejoshualewis,

Thanks for your report.
Can you please provide us the exact steps to reproduce the issue in a new comment.
What is the exact version PrestaShop did you use?

Thanks!

Hi @khouloudbelguith

We have a custom payment method to integrate BitPay, and have a module for Prestashop, and everything works.

Our IPN updates the shops when the status has changed on the blockchain to properly update the order status, add notes, etc and we're wanting to be able to send a notification when it reaches confirmed

In this block of code
https://github.com/bitpay/prestashop-v2/blob/master/controllers/front/ipn.php#L70

We attached the Mail Send from above, and thats when we get the error. The template files do exist, and if we login to the admin section and go to the Advanced Parameters->Emaiil, we see a lot of attempts.

Thanks

@thejoshualewis, so, after some modifications in your PrestaShop core added manually, you have this error?
So, it is not a PrestaShop core issue?

Thanks!

@khouloudbelguith The core hasnt been modified, this is all from a module. Calling the Mail functionality is what is causing the $template missing issue.

@thejoshualewis,

As it's not a module provided by Prestashop, we can't do anything with this.
You should contact the module author via your addons.prestashop.com account, they are the only ones to help you with it.
Thanks!

@khouloudbelguith

We are the module author, the issue is interacting with the core Prestashop using the mail functionality. Does that block of code look correct, or is there somewhere that shows how to call this directly with explanations?

@thejoshualewis, sorry for closing the issue.
I will re-open the issue.
Thanks!

@thejoshualewis, Please be aware that this bug tracker should be used to report issues ONLY. If you need help, you can ask on the Forum (https://www.prestashop.com/forums/), Gitter (https://gitter.im/PrestaShop/General) or Stack Overflow (https://stackoverflow.com/questions/tagged/prestashop).
If the issue occurs due to the module, we need to close the issue.

Thanks for your understanding!

@thejoshualewis, can we close this issue?

Thanks!

@thejoshualewis, feel free to open a new one when needed.

Thanks!

i have the same issue im using V: 1.7.5.1
Version de PHP : 7.2.28
theme : warehouse
PHP Fatal error: Uncaught --> Smarty: 0():Missing '$template' parameter <--
thrown in public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php on line 177

and i can't figure out, any idea please

Hello,

Same issue with this error : PHP Fatal error: Uncaught --> Smarty: 0():Missing '$template' parameter <-- \n thrown in /var/www/html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php on line 177

PS 1.7.6.1 > Theme custom with child

Serveur Linux #1 SMP Debian 4.19.67-2+deb10u2 (2019-11-11) x86_64
Apache/2.4.38 (Debian)
PHP : 7.2.32-1+0~20200710.46+debian10~1.gbp625eb5

Hi, I find so much post about this error but it's solved nowhere...

Capture d’écran 2020-11-06 à 13 55 57

Hi,
i've exactly the same error many times and there is no way to understand what template missing.
Is there a way more then a DEBUG on to discover what template missin cause the error?

[13-Nov-2020 10:05:41 Europe/Rome] PHP Fatal error:  Uncaught  --> Smarty: 0():Missing '$template' parameter <-- 
  thrown in /home/www/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php on line 177
Was this page helpful?
0 / 5 - 0 ratings