The Issue
During a fresh installation of Open Journal Systems (OJS) 3.5.0-5, the installation stopped with the following fatal error:
Fatal error: Uncaught --> Smarty Compiler: Syntax error in template"app:install/install.tpl" on line 16"{translate key="installer.appInstallation"}"unknown tag 'translate'<-- thrown in app:install/install.tpl on line 16Because the error mentioned Smarty and the {translate} tag, the initial suspicion was a missing Smarty component, damaged template, or incorrect file permissions.
Environment
ComponentConfigurationApplicationOpen Journal Systems 3.5.0-5InstallationFresh OJS installationOJS packageOfficial release packageSmarty vendor directoryPresentFile permissionsCorrectInitial PHP versionPHP 8.4Working PHP versionPHP 8.3What We Checked
We first verified the OJS installation files and confirmed that the bundled Smarty vendor directory was present. File permissions were also correct.
The {translate} tag in install/install.tpl was valid OJS template syntax, so modifying the template was not the appropriate solution.
The next critical check was the PHP runtime.
The Root Cause
The server was running PHP 8.4.
PKP has documented an OJS 3.5.0-5 compatibility issue involving PHP 8.4 and the locale initialization process. OJS passes a large list of language tags to PHP's Locale::lookup(). In the documented case, the list contains 799 language entries.
Under PHP 8.3, the diagnostic returned an empty string. Under PHP 8.4, it returned NULL. That value could then reach Locale::setDefault(), which expects a string and throws a TypeError.
PKP records the resulting failure as preventing the default theme from being initialized correctly. This explains why an apparently unrelated Smarty template error can appear during OJS startup. PKP Issue #13139.
The Fix
We changed the PHP version used by the OJS website from:
PHP 8.4to:
PHP 8.3After changing the PHP runtime, the OJS installation proceeded normally.
No changes were made to:
install/install.tpl- OJS translation files
- Smarty vendor files
Before and After
ConfigurationResultOJS 3.5.0-5 + PHP 8.4Fatal Smarty “unknown tag 'translate'” errorOJS 3.5.0-5 + PHP 8.3Installation completed successfullyWhy This Error Is Misleading
The important lesson is that the final Smarty error was a symptom rather than the underlying problem.
When OJS fails during application initialization, a failure in localization or plugin/theme initialization can surface later as a template compilation error.
Therefore, when a standard OJS template suddenly reports an unknown built-in tag, check the complete PHP/OJS environment before editing the template.
Recommended Troubleshooting Sequence
- Confirm the exact OJS version.
- Confirm the PHP version actually used by the website.
- Verify required PHP extensions, especially
intl. - Verify that the official OJS package is complete.
- Check filesystem permissions.
- Clear OJS compiled-template/cache directories.
- Review the PHP/OJS error log for the underlying exception.
- Compare the OJS/PHP combination against known PKP compatibility issues.
Conclusion
The OJS 3.5.0-5 installation was failing with:
Smarty Compiler: unknown tag 'translate'The OJS package and Smarty files were intact, and permissions were correct. The decisive difference was the PHP runtime.
Changing PHP 8.4 to PHP 8.3 resolved the problem without modifying OJS core files.
PKP has subsequently documented the underlying PHP 8.4 locale-related issue and associated the fix with the OJS/PKP 3.5.0-6 development milestone. See PKP Issue #13139.
Key takeaway: If OJS 3.5.0-5 reports a Smarty unknown tag 'translate' error during installation while the official files and permissions are correct, check the PHP version before changing the OJS template.
Frequently Asked Questions
What causes the OJS “unknown tag translate” error?
For the OJS 3.5.0-5/PHP 8.4 compatibility issue documented by PKP, a failure in locale initialization can prevent the normal OJS theme and template environment from being initialized.
Is the OJS install.tpl file broken?
Not necessarily. The {translate} tag is valid OJS template syntax. The runtime environment should be investigated before modifying the template.
Does OJS 3.5.0-5 work with PHP 8.3?
Yes. In this case study, changing the website from PHP 8.4 to PHP 8.3 resolved the installation failure.
Should Smarty be reinstalled?
No. If the official OJS package contains the expected Smarty vendor files, manually replacing Smarty can introduce a version mismatch.
What PHP version should I use for OJS 3.5.0-5?
For this specific OJS 3.5.0-5 issue, PHP 8.3 is the practical working configuration demonstrated by this case. Always verify the PHP/OJS combination against the current PKP requirements and release-specific compatibility information.
Was this caused by incorrect file permissions?
No. In this case, permissions were verified as correct. The problem was resolved by changing the PHP runtime.