Title: Call to undefined function
Last modified: January 3, 2021

---

# Call to undefined function

 *  Resolved [thementalist2020](https://wordpress.org/support/users/thementalist2020/)
 * (@thementalist2020)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/call-to-undefined-function-37/)
 * 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](https://wordpress.org/support/users/timwhitlock/)
 * (@timwhitlock)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/call-to-undefined-function-37/#post-13860879)
 * 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](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](https://github.com/loco/wp-loco/blob/2.4.5/src/Locale.php#L489)
 *  Plugin Author [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * (@timwhitlock)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/call-to-undefined-function-37/#post-13881153)
 * 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](https://wordpress.org/support/users/timwhitlock/)
 * (@timwhitlock)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/call-to-undefined-function-37/#post-13891033)
 * 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](https://wordpress.org/support/users/thementalist2020/)
 * (@thementalist2020)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/call-to-undefined-function-37/#post-13891061)
 * 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](https://wordpress.org/support/users/timwhitlock/)
 * (@timwhitlock)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/call-to-undefined-function-37/#post-13891114)
 * 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.

 * ![](https://ps.w.org/loco-translate/assets/icon-256x256.png?rev=1000676)
 * [Loco Translate](https://wordpress.org/plugins/loco-translate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/loco-translate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/loco-translate/)
 * [Active Topics](https://wordpress.org/support/plugin/loco-translate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/loco-translate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/loco-translate/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/call-to-undefined-function-37/#post-13891114)
 * Status: resolved