Ojs crash framework - Smarty Compiler: Syntax error in template "app:app:frontendpagesindexSite.tpl

Hi, we have two different instances, on different servers, that have had a problem since yesterday that caused the entire graphic template to fail.

The problem, currently fixed, concerns the Italian-English dual language, which causes a framework issue.

The error was this:

Fatal error: Uncaught → Smarty Compiler: Syntax error in template “app:app:frontendpagesindexSite.tpl” on line 29 “{translate key=“context.contexts”}” unknown tag ‘translate’ ← thrown in app:frontendpagesindexSite.tpl on line 29

The fix applied that solves the problem is a bug in the language setting class.

This problem occurred on one dual language instance and on another English instance.

ojs 3.5.0.3 on both

this is the log

[error] 1378216#1378216: *564 FastCGI sent in stderr: “PHP message: Plugin APP\plugins\themes\bootstrap3\BootstrapThreeThemePlugin failed to handle the hook PluginRegistry::categoryLoaded::themes
TypeError: Locale::setDefault(): Argument #1 ($locale) must be of type string, null given in /lib/pkp/classes/i18n/Locale.php:163
Stack trace:
#0 /lib/pkp/classes/i18n/Locale.php(163): Locale::setDefault()
#1 /lib/pkp/classes/i18n/Locale.php(143): PKP\i18n\Locale->setLocale()
#2 /lib/pkp/classes/i18n/Locale.php(475): PKP\i18n\Locale->getLocale()
#3 /lib/pkp/classes/i18n/Locale.php(114): PKP\i18n\Locale->translate()
#4 /lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(965): PKP\i18n\Locale->get()
#5 /lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(1000): trans()
#6 /plugins/themes/bootstrap3/BootstrapThreeThemePlugin.php(32): __()
#7 /lib/pkp/classes/plugins/ThemePlu” while reading response header from upstream, client: 47.77.220.146, server: , request: “GET /index.php/index/en HTTP/2.0”, upstream: “fastcgi://unix:/run/php/php8.4-fpm.sock:”, host:"

and the solution

/lib/pkp/classes/i18n/Locale.php:163
\Locale::setDefault(\Locale::lookup($locales, $locale, true));
changed whit
\Locale::setDefault(\Locale::lookup($locales, $locale, true) ?: $locale);