Page 1 of 1

Smarty Internal Template Error

Posted: Wed Aug 17, 2022 10:55 am
by JoshsNow
After our host upgraded our php from 5.6 to 7.4, the website has been down, producing the following error message

ERROR at line 185 of file /home/770660.cloudwaysapps.com/wqrajjcjhu/public_html/lib/smarty/sysplugins/smarty_internal_template.php:

Error Message: Unable to load template 'tpl_top:7'

Track Trace:
#0 /home/770660.cloudwaysapps.com/wqrajjcjhu/public_html/lib/smarty/sysplugins/smarty_internal_templatebase.php(216): Smarty_Internal_Template->render()
#1 /home/770660.cloudwaysapps.com/wqrajjcjhu/public_html/lib/smarty/sysplugins/smarty_internal_templatebase.php(107): Smarty_Internal_TemplateBase->_execute()
#2 /home/770660.cloudwaysapps.com/wqrajjcjhu/public_html/lib/classes/internal/class.CMS_Smarty_Template.php(20): Smarty_Internal_TemplateBase->fetch()
#3 /home/770660.cloudwaysapps.com/wqrajjcjhu/public_html/index.php(151): CMS_Smarty_Template->fetch()
#4 {main}

I have looked about on the forums and seen a few similar problems and tried some of the solutions but so far none have worked so thought Id post it here to see if anyone could help.

Thanks in advance.

Re: Smarty Internal Template Error

Posted: Wed Aug 17, 2022 1:55 pm
by DIGI3
We need to know what version of CMSMS you're running before we can give you any useful suggestions.

Re: Smarty Internal Template Error

Posted: Thu Aug 18, 2022 9:41 am
by JoshsNow
DIGI3 wrote: Wed Aug 17, 2022 1:55 pm We need to know what version of CMSMS you're running before we can give you any useful suggestions.
Apologies I thought I had put that in my original post I obviously forgot.

I'm using the latest version, Version 2.2.16

Re: Smarty Internal Template Error

Posted: Thu Aug 18, 2022 2:11 pm
by DIGI3
First I would clear the cmsms cache, then probably start looking for old modules and temporarily disabling them and commenting out any tags. If that doesn't work, try using a default template - if that solves it, then start commenting out parts of your template(s) until you can narrow down what's causing it.

Re: Smarty Internal Template Error

Posted: Thu Aug 18, 2022 2:18 pm
by JoshsNow
DIGI3 wrote: Thu Aug 18, 2022 2:11 pm First I would clear the cmsms cache, then probably start looking for old modules and temporarily disabling them and commenting out any tags. If that doesn't work, try using a default template - if that solves it, then start commenting out parts of your template(s) until you can narrow down what's causing it.
Thanks for responding. I'll give all this a try and then update with whether or not its successful or unsuccessful

Re: Smarty Internal Template Error

Posted: Thu Aug 18, 2022 3:20 pm
by JoshsNow
Apparently in my original post, I forgot to mention the other error, which I am presuming is related. Some parts of the admin panel are down. Content Manager just loads a blank screen. This has happened before but never whilst I have used FireFox as a browser

Design Manager is glitchy, loading up the following under templates

"SELECT SQL_CALC_FOUND_ROWS tpl.id FROM cms_layout_templates tpl LEFT JOIN cms_layout_tpl_type type ON tpl.type_id = type.id ORDER BY tpl.name asc LIMIT 0, 100 -- Table 'wqrajjcjhu.cms_layout_templates' doesn't exist

and the following under stylesheets

SELECT SQL_CALC_FOUND_ROWS S.id FROM cms_layout_stylesheets S ORDER BY S.name ASC LIMIT 0, 100 -- Table 'wqrajjcjhu.cms_layout_stylesheets' doesn't exist

whilst designs, prototypes and categories don't load anything.

I am heavily presuming this error is linked to the Smarty one, so will use the solutions already posted, just wondering if this error adds any more context for what could be causing the problem many thanks.

Re: Smarty Internal Template Error

Posted: Fri Aug 19, 2022 12:56 pm
by JoshsNow
DIGI3 wrote: Thu Aug 18, 2022 2:11 pm First I would clear the cmsms cache, then probably start looking for old modules and temporarily disabling them and commenting out any tags. If that doesn't work, try using a default template - if that solves it, then start commenting out parts of your template(s) until you can narrow down what's causing it.
Thanks for the advice, I've tried with the modules but no luck sadly. I would try the default template, but as stated in my post above, I am unable to access Design Manager at the minute. Would you believe these issues to be linked?

Re: Smarty Internal Template Error

Posted: Fri Aug 19, 2022 2:33 pm
by DIGI3
It sounds like perhaps an upgrade didn't go well, but if it worked normally in PHP 5.6 then it shouldn't be that. It could also be database corruption, not sure if you have a working backup you can test/compare with.
Other things to try:
have a look at the database and ensure the tables it's saying are missing are, in fact, there. If not, you'll need to restore from a known-good backup.
run the installer to do a "freshen" install (this won't fix any missing tables, but can't hurt)

Failing that, you may need to have an experienced developer dig in. It's possible it's not recoverable if the tables are missing though, or very hard to recover if it's a botched upgrade.

Re: Smarty Internal Template Error

Posted: Thu Apr 06, 2023 3:06 pm
by janvl
Hi,

i just had the same problem, moving to another server.
The original is CMSMS 2.2.9 - an Update to 2.2.16 after the move did not work.

I will do an update to 2.2.16 on the original server later and then move to the other server,
and make a lot of backups . . .

One question: on the original server is mysql and on the new server mariadb, do i have to
change config.php for that, it was obliged with another webapplication (Moodle)?

Regards,
Jan

Re: Smarty Internal Template Error

Posted: Thu Apr 06, 2023 9:46 pm
by janvl
Hi

i picked the wrong database . . . .
just deleted all on the new server and copied the right webspace and database, set the permissions right, deleted everything in tmp/cache and tmp/templates_c exept for index.html.

It just works!

Also the update from 2.2.9 to 2.2.16.

Regards,
Jan