• Resolved thementalist2020

    (@thementalist2020)


    Hi,
    I can’t access the plugin on the WordPress Dashboard anymore and I got the following error:#

    An error of type E_ERROR was caused on line 60 of file /var/www/vhosts/XXXX/wp-content/plugins/loco-translate/src/Locale.php. Error message: Uncaught Error: Call to undefined function loco_parse_wp_locale() in /var/www/vhosts/XXXX/wp-content/plugins/loco-translate/src/Locale.php:60
    Stack trace:
    #0 /var/www/vhosts/XXXX/wp-content/plugins/loco-translate/src/fs/LocaleFile.php(51): Loco_Locale::parse('languages')
    #1 /var/www/vhosts/XXXX/wp-content/plugins/loco-translate/src/fs/LocaleFile.php(35): Loco_fs_LocaleFile->getLocale()
    #2 /var/www/vhosts/XXXX/wp-content/plugins/loco-translate/src/fs/LocaleFile.php(117): Loco_fs_LocaleFile->split()
    #3 /var/www/vhosts/XXXX/wp-content/plugins/loco-translate/src/package/Listener.php(206): Loco_fs_LocaleFile->hasPrefixOnly()
    #4 /var/www/vhosts/XXXX/wp-content/plugins/loco-translate/src/package/Listener.php(3

    What could be the issue here? Thank you very much.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tim W

    (@timwhitlock)

    Sounds like you have a file missing, although I’d expect you to receive an earlier error about this.

    (1) Check you have the file at:
    /var/www/vhosts/XXXX/wp-content/plugins/loco-translate/lib/compiled/locales.php

    (2) Check it contains loco_parse_wp_locale, should be first function in file:
    https://github.com/loco/wp-loco/blob/2.4.5/lib/compiled/locales.php#L5

    (3) Check it’s actually getting included here:
    https://github.com/loco/wp-loco/blob/2.4.5/src/Locale.php#L489

    Plugin Author Tim W

    (@timwhitlock)

    Did you look into the three things I suggested? This is a critical error, so I’d be grateful if you could post back or mark as resolved.

    Plugin Author Tim W

    (@timwhitlock)

    I’m closing this ticket due to no reply. As the error is not reproducible under normal circumstances I don’t a bug that I can investigate. Feel free to reopen if any new information comes to light.

    Thread Starter thementalist2020

    (@thementalist2020)

    Yes, sorry for the late reply. Since I didn’t quite unterstood what you meant, the /var/www/vhosts/XXXX/wp-content/plugins/loco-translate/lib/compiled/locales.php file was missing and reinstalling didn’t change much I reinstalled the whole plugin. This did the trick.

    Plugin Author Tim W

    (@timwhitlock)

    Makes sense. Sounds like a broken install. Thanks for posting back.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Call to undefined function’ is closed to new replies.