It appears that calls to the _n function whilst generating the admin plugins page lead to the partial generation of a page.

Looking at the code, it appears the default translation leads to a request to load translation files.

PHP error log trace:

[10-Feb-2025 12:34:31 UTC] PHP Fatal error: Uncaught ValueError: Path cannot be empty in D:\Projects\osTicket\upload\include\class.translation.php:568
Stack trace:
#0 D:\Projects\osTicket\upload\include\class.translation.php(352): Translation->load_tables()
#1 D:\Projects\osTicket\upload\include\class.translation.php(380): gettext_reader->get_plural_forms()
#2 D:\Projects\osTicket\upload\include\class.translation.php(414): gettext_reader->select_string()
#3 D:\Projects\osTicket\upload\include\class.i18n.php(576): gettext_reader->ngettext()
#4 D:\Projects\osTicket\upload\include\staff\settings-system.inc.php(118): _N()
#5 D:\Projects\osTicket\upload\scp\settings.php(57): include_once('...')
#6 {main}
thrown in D:\Projects\osTicket\upload\include\class.translation.php on line 568

    DaveWPinUK

    Maybe permission issues. Ensure all the permissions and ownerships are correct on all core files and plugin files. If all else fails try re-uploading all the files.

    Cheers.

    20 days later

    The problem is linked to language files. There are two issues:

    • When I performed the upgrade I did not copy the en_GB.phar file into the l18n folder. An easy mistake - could the upgrade procedure do a consistency check between languages registered against Users and the language files stored in the l18n folder.
    • There is a consistency issue in naming language files and the language/region coding used by browsers where a hyphen is used. For example, here in the UK, my browser generates the language string as "en-GB", but the language phar file is en_GB.phar. See Mozilla documentation on the subject
      Write a Reply...