• Resolved oluwatemilorun

    (@oluwatemilorun)


    After upgrading from PHP 8.1 to PHP 8.3, we started seeing this error on the latest version (5.4)

    PHP Fatal error:  Uncaught Error: Class "WeglotLanguages\Languages" not found in /var/app/current/blog/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Client/Endpoint/LanguagesList.php:22
    Stack trace:
    #0 /var/app/current/blog/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Client/Endpoint/LanguagesList.php(31): Weglot\Client\Endpoint\LanguagesList->getLanguages()
    #1 /var/app/current/blog/wp-content/plugins/weglot/src/services/class-language-service-weglot.php(65): Weglot\Client\Endpoint\LanguagesList->handle()
    #2 /var/app/current/blog/wp-content/plugins/weglot/src/services/class-language-service-weglot.php(124): WeglotWP\Services\Language_Service_Weglot->get_languages_available()
    #3 /var/app/current/blog/wp-content/plugins/weglot/src/services/class-language-service-weglot.php(158): WeglotWP\Services\Language_Service_Weglot->get_all_languages()
    #4 /var/app/current/blog/wp-content/plugins/weglot/src/services/class-language-service-weglot.php(230): WeglotWP\Services\Language_Service_Weglot->get_language_from_internal()
    #5 /var/app/current/blog/wp-content/plugins/weglot/src/third/yoast/class-redirect-handler-weglot.php(42): WeglotWP\Services\Language_Service_Weglot->get_original_language()
    #6 /var/app/current/blog/wp-content/plugins/weglot/src/third/yoast/redirect-premium.php(14): Redirect_Handler_Weglot->load()
    #7 /var/app/current/blog/wp-content/plugins/weglot/weglot.php(80): include_once('...')
    #8 /var/app/current/blog/wp-settings.php(491): include_once('...')
    #9 /var/app/current/blog/wp-config.php(72): require_once('...')
    #10 /var/app/current/blog/wp-load.php(50): require_once('...')
    #11 /var/app/current/blog/wp-blog-header.php(13): require_once('...')
    #12 /var/app/current/blog/index.php(17): require('...')
    #13 {main}
    thrown in /var/app/current/blog/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Client/Endpoint/LanguagesList.php on line 22
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Edson Galina Fortes

    (@glx77)

    Hi @oluwatemilorun ,
    hope you’re fine? Sorry for the issue you’re facing.

    The fatal error comes from a missing class WeglotLanguages\Languages, which is expected to be autoloaded from:
    vendor/weglot/weglot-php/node_modules/@weglot/languages/dist/Languages.php

    This file is part of the Weglot PHP SDK dependency tree. Since it resides inside a node_modules directory, it is often excluded during deployments or migrations (e.g. via .gitignore, rsync filters, or CI pipelines).

    As a result, the Composer autoloader cannot resolve the class, leading to the fatal error.

    Please verify that the file exists at the expected path. If it is missing, the recommended fix is to reinstall the plugin from the official source:
    https://downloads.wp.xz.cn/plugin/weglot.5.4.zip

    This will restore the full vendor tree, including the embedded node_modules.

    For clarity: Weglot is fully compatible with PHP 8.3, so this issue is not related to PHP versioning but strictly to missing files.

    don’t hesitate if you need more help

    Regards

    Plugin Contributor Edson Galina Fortes

    (@glx77)

    Hi @oluwatemilorun ,

    hope you’re fine? Do you still facing your issue ? don’t hesitate if you need more help

    regards

    Thread Starter oluwatemilorun

    (@oluwatemilorun)

    Hi @glx77

    The issue was indeed with the missing node_modules. So including it back got it working again.

    Thanks for the support!

    Plugin Contributor Edson Galina Fortes

    (@glx77)

    Hi @oluwatemilorun ,

    Thanks again for your reply – we’re always happy to help!

    If you’re happy with the support you received, would you mind leaving a quick review on WordPress?

    👉 https://ww.wp.xz.cn/support/plugin/weglot/reviews/

    We’d really appreciate it – your support means a lot to us and helps others discover Weglot too. 😊

    Thanks a lot in advance, and have a great day!

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

You must be logged in to reply to this topic.