dannielhendrix Posted March 26, 2019 Share Posted March 26, 2019 (edited) Hello, Wondering if anyone can help me in the right direction.. I have upgraded from 1.6.X.X to 1.7.5.0, everything seemed to be ok, now all of a sudden I have this error! when I say all of a sudden, I mean that the upgrade was made a month ago and the error is about 2 days old PHP Fatal error: Uncaught --> Smarty: 0():Missing '$template' parameter <-- thrown in /home/********/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php on line 177 ***** - is my host name blured out. What appears to be the problem? Does anyone know? Many thanks, Daniel P.S: at first sight the frontend of the store seems to be ok but I would like to know what is this error and if it affects my shop in any way and the activity on it Edited March 26, 2019 by dannielhendrix (see edit history) Link to comment Share on other sites More sharing options...
Giufan15 Posted April 19, 2019 Share Posted April 19, 2019 the usual mistake. Has anyone solved it? Link to comment Share on other sites More sharing options...
MigrationPro Posted April 19, 2019 Share Posted April 19, 2019 Hello, if use additional theme change the theme to the default one and clear cache of the shop then try again. 1 Link to comment Share on other sites More sharing options...
crodrigues Posted July 12, 2019 Share Posted July 12, 2019 I had the same problem, and I solved. http://forge.prestashop.com/browse/BOOM-4826 whatch the video in this page! Link to comment Share on other sites More sharing options...
Carles Peats Posted May 8, 2020 Share Posted May 8, 2020 Hello, I cannot access this link, I get error 404. You can send me the content. Since I have the same error and I don't know how to fix it. Thank you. http://forge.prestashop.com/browse/BOOM-4826 Link to comment Share on other sites More sharing options...
Create Publicidad Posted May 20, 2020 Share Posted May 20, 2020 Buenas noches a todos tengo el mismo problema PHP Fatal error: Uncaught --> Smarty: 0():Missing '$template' parameter <-- Link to comment Share on other sites More sharing options...
fercaldas Posted July 16, 2020 Share Posted July 16, 2020 (edited) up. same here. V 1.7.6.4 No access to back or front office Thanks Edited July 16, 2020 by fercaldas (see edit history) Link to comment Share on other sites More sharing options...
seron Posted August 4, 2020 Share Posted August 4, 2020 i have same problem someone can help me please AH01071: Got error 'PHP message: PHP Fatal error: Uncaught --> Smarty: 0():Missing '$template' parameter <-- \n thrown in /var/www/vhosts/.../.../vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php on line 177\n', referer: https://.../ Link to comment Share on other sites More sharing options...
rvkvino Posted August 27, 2020 Share Posted August 27, 2020 I'm also getting same error can any one help me on this? Whether this causes the order creation after successful payment? [27-Aug-2020 08:26:37 Asia/Kolkata] PHP Fatal error: Uncaught --> Smarty: 0():Missing '$template' parameter <-- thrown in /home/public_html/e/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php on line 177 [27-Aug-2020 08:32:41 Asia/Kolkata] PHP Fatal error: Uncaught --> Smarty: 0():Missing '$template' parameter <-- thrown in /home/public_html/e/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php on line 177 [27-Aug-2020 09:33:43 Asia/Kolkata] PHP Fatal error: Uncaught --> Smarty: 0():Missing '$template' parameter <-- thrown in /home/public_html/e/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php on line 177 Link to comment Share on other sites More sharing options...
musicmaster Posted September 12, 2021 Share Posted September 12, 2021 See https://github.com/PrestaShop/statsdata/pull/7 https://github.com/PrestaShop/PrestaShop/issues/20921 As far as I followed the discussion it seemed that the pull still didn't fix the issue. Link to comment Share on other sites More sharing options...
Hart Posted October 7, 2021 Share Posted October 7, 2021 yes there is no fix yet.. that is scandalous! 2 Link to comment Share on other sites More sharing options...
webbrent Posted September 19, 2022 Share Posted September 19, 2022 Still nothing? Has anyone managed to solve this issue as of yet? Link to comment Share on other sites More sharing options...
Webo.Agency Posted September 19, 2022 Share Posted September 19, 2022 Change this: $html = $this->display($location); to this: $this->setTemplate( $location ); $html = $this->display($location); Link to comment Share on other sites More sharing options...
webbrent Posted September 19, 2022 Share Posted September 19, 2022 15 minutes ago, Webo.Agency said: Change this: $html = $this->display($location); to this: $this->setTemplate( $location ); $html = $this->display($location); I am assuming these changes are made in the smarty_internal_templatebase.php? My line 177 in this php file reads as follows: Quote { $smarty = $this->_getSmartyObj(); $saveVars = true; if ($template === null) { if (!$this->_isTplObj()) { throw new SmartyException($function . '():Missing \'$template\' parameter'); } else { $template = $this; } I am utilising PS 1.7.8.7 with PHP 7.4.30 - I am assuming there have been changes made previously to fix this with a release, but it now seems to have reared its head again. Any advice will be most certainly welcome as this error is slowing down our sites as well as effecting our sales in the process. TIA Link to comment Share on other sites More sharing options...
Webo.Agency Posted September 23, 2022 Share Posted September 23, 2022 (edited) On 9/19/2022 at 3:41 PM, webbrent said: I am assuming these changes are made in the smarty_internal_templatebase.php? My line 177 in this php file reads as follows: I am utilising PS 1.7.8.7 with PHP 7.4.30 - I am assuming there have been changes made previously to fix this with a release, but it now seems to have reared its head again. Any advice will be most certainly welcome as this error is slowing down our sites as well as effecting our sales in the process. TIA No, assume modules that use implementation of "$this->display" in modules Find in project all places where "$this->display" is used and add above "$this->setTemplate( $location );" where $locations is only example there (use existing parameter) It is working fine in native modules and core. If liked to be fixed then pleas add pull request with solution from your perspective as a IT guy. Pleas upgrade all modules and check compatibility There is many breaking change between 1.6.X.X and 1.7.X.X You can contact us for support if needed Edited September 23, 2022 by Webo.Agency Add information about versions (see edit history) Link to comment Share on other sites More sharing options...
webbrent Posted September 23, 2022 Share Posted September 23, 2022 (edited) I have isolated the module causing the error... Data mining for statistics seems to be throwing the aforementioned error. When disabled it stops throwing the Apache Error with regards to "Missing $Template Parameter. However now it has started throwing the following error when navigating the "Dashboard" section of the BO. Quote [Fri Sep 23 16:02:25.739578 2022] [php7:warn] [pid 238646] [client xxx.xxx.xxx.xxx:57574] PHP Warning: Invalid argument supplied for foreach() in /var/www/domain.co.za/html/modules/dashproducts/dashproducts.php on line 219, referer: https://domain.co.za/adminxxxxxxxxx/index.php?controller=AdminDashboard&token=xxxxxxxxxxxxxxxxxxxxx I have attempted to reset the module and it has done nothing favourable either. Perhaps a total removal of this module would be more ideal. Edited September 23, 2022 by webbrent (see edit history) Link to comment Share on other sites More sharing options...
Webo.Agency Posted October 13, 2022 Share Posted October 13, 2022 On 9/23/2022 at 4:04 PM, webbrent said: I have isolated the module causing the error... Data mining for statistics seems to be throwing the aforementioned error. When disabled it stops throwing the Apache Error with regards to "Missing $Template Parameter. However now it has started throwing the following error when navigating the "Dashboard" section of the BO. I have attempted to reset the module and it has done nothing favourable either. Perhaps a total removal of this module would be more ideal. Removing it for favor of Matamoto or Google Analytics or other tool is great approach. It isn't updated as module and viable right now as functional. Link to comment Share on other sites More sharing options...
devHeaven Posted January 27, 2023 Share Posted January 27, 2023 My solution. modify /classes/controller/FrontController.php:724 $html .= $this->context->smarty->fetch($tpl, null, $theme . $this->getLayout()); to $html .= $this->context->smarty->fetch($tpl, null, $theme .'/templates/'. $this->getLayout()); and /classes/controller/FrontController.php:727 $html = $this->context->smarty->fetch($content, null, $theme . $this->getLayout()); to $html = $this->context->smarty->fetch($content, null, $theme .'/templates/'. $this->getLayout()); 2 Link to comment Share on other sites More sharing options...
Smart-Modules Posted February 16, 2023 Share Posted February 16, 2023 Just in case this may help anyone. I've found myself in this situation too. In my case, the error was triggered because the template was not set in the initContent method from a module's FrontController. In case you're using your own FrontControllers there are two possible solutions Set the template to use by adding the $this->setTemplate('...'); to the initContent call Make the script end before reaching the end of the method (for example if it was an ajax call, where you just need to output some content). To end it you can use the keyword exit; 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now