XOOPS / XoopsCore25

XOOPS Core 2.5.x (current release is 2.5.11: https://github.com/XOOPS/XoopsCore25/releases)
GNU General Public License v2.0
71 stars 59 forks source link

SmartyCompilerException #1473

Closed JJDai54 closed 1 month ago

JJDai54 commented 1 month ago

I updated a test site with xoops 2.5.12. All modules have been updated. Caches have been cleared

I have the error: Error : SmartyCompilerException: Syntax error in template "db:db:system_notification_select.tpl" on line 5 "" unknown tag 'php'

site de test : https://test.sages91.fr/

site de prod : https://sages91.fr/ JJDai

mambax7 commented 1 month ago

The 'php' tag has been removed from Smarty, so you'll need to rewrite your Smarty code See: https://github.com/smarty-php/smarty/blob/master/CHANGELOG.md

mambax7 commented 1 month ago

There is a discussion with some more information here: https://github.com/smarty-php/smarty/discussions/734

The advice there: "run all the PHP code you need to run, assign the results to a template variable and then display the template."

JJDai54 commented 1 month ago

ok i have rewrite my code in the theme to search the langagr file. But ther is always balise {php} in:

module system J:\Conseil Des Sages\Site Web_MAJ pour Xoops 2512\sages91_test01\htdocs\modules\system\templates\system_imagemanager.html [1] 29,5: <{php}> J:\Conseil Des Sages\Site Web_MAJ pour Xoops 2512\sages91_test01\htdocs\modules\system\templates\system_imagemanager.tpl [1] 29,5: <{php}> J:\Conseil Des Sages\Site Web_MAJ pour Xoops 2512\sages91_test01\htdocs\modules\system\templates\system_imagemanager2.html [1] 12,5: <{php}> J:\Conseil Des Sages\Site Web_MAJ pour Xoops 2512\sages91_test01\htdocs\modules\system\templates\system_imagemanager2.tpl [1] 12,5: <{php}>

mambax7 commented 1 month ago

it's happening because most probably the template is still stored in the database, and XOOPS is pulling it from there. Did you run the system module update? Try that and see if it solved the issue.

JJDai54 commented 1 month ago

I updated all the modules used, emptied the caches, ... I deleted them manually to finish. Anyway the problem came mainly from my "slider" module which used the {php} tag to load a specific language file. I have to find another solution for that, I can probably use the global variable "$xoopsConfig" and the constant 'XOOPS_ROOT_PATH'.

mambax7 commented 1 month ago

Thank you for testing and keeping us updated!