Skip to content Skip to sidebar

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 13:00 9:00 – 13:00 9:00 – 13:00 8:00 – 12:00 8:00 – 12:00 -
- 14:00 – 17:00 14:00 – 18:00 14:00 – 18:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Europe/Zagreb (GMT+02:00)

This topic contains 1 reply, has 2 voices.

Last updated by Bruno Kos 1 year, 11 months ago.

Assisted by: Bruno Kos.

Author Posts
August 2, 2023 at 10:08 am #14141147

Carloalberto

Tell us what you are trying to do?
I'm managing my site using git and have several environments (develop, staging, production).
When I deploy updates I got WPML error that breaks the site with a 500 error.

Is there any documentation that you are following?

Here is the error I got:

2023/08/02 09:35:22 [error] 3367184#3367184: *3875040 FastCGI sent in stderr: "PHP message: PHP Warning: include(/home/wp-user/www/mysite/releases/159/wp-content/plugins/sitepress-multilingual-cms/vendor/composer/../../classes/language/Detection/CookieLanguage.php): failed to open stream: No such file or directory in /home/wp-user/www/mysite/releases/159/vendor/composer/ClassLoader.php on line 444PHP message: PHP Stack trace:PHP message: PHP 1. {main}() /home/wp-user/www/mysite/releases/159/index.php:0PHP message: PHP 2. require() /home/wp-user/www/mysite/releases/159/index.php:17PHP message: PHP 3. require_once() /home/wp-user/www/mysite/releases/159/wp-blog-header.php:13PHP message: PHP 4. require_once() /home/wp-user/www/mysite/releases/159/wp-load.php:50PHP message: PHP 5. require_once() /home/wp-user/www/mysite/releases/159/wp-config.php:112PHP message: PHP 6. include_once() /home/wp-user/www/mysite/releases/159/wp-settings.php:453PHP message: PHP 7. wpml_load_request_handler() /home/wp-user/www/mysite/releases/159/wp-content/plugins/sitepress-multilingual-cms/sitepress.php:297PHP message: PHP 8. spl_autoload_call() /home/wp-user/www/mysite/releases/159/wp-content/plugins/sitepress-multilingual-cms/inc/wpml_load_request_handler.php:18PHP message: PHP 9. Composer\Autoload\ClassLoader->loadClass() /home/wp-user/www/mysite/releases/159/wp-content/plugins/sitepress-multilingual-cms/inc/wpml_load_request_handler.php:18PHP message: PHP 10. Composer\Autoload\includeFile() /home/wp-user/www/mysite/releases/159/vendor/composer/ClassLoader.php:322PHP message: PHP Warning: include(): Failed opening '/home/wp-user/www/mysite/releases/159/wp-content/plugins/sitepress-multilingual-cms/vendor/composer/../../classes/language/Detection/CookieLanguage.php' for inclusion (include_path='.:/usr/share/php') in /home/wp-user/www/mysite/releases/159/vendor/composer/ClassLoader.php on line 444PHP message: PHP Stack
2023/08/02 09:35:22 [error] 3367184#3367184: *3875040 FastCGI sent in stderr: "-user/w...')
#6 {main}
thrown in /home/wp-user/www/mysite/releases/159/wp-content/plugins/sitepress-multilingual-cms/i...PHP message: PHP Fatal error: Uncaught Error: Call to a member function get_requested_lang() on null in /home/wp-user/www/mysite/releases/159/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php:1131
Stack trace:
#0 /home/wp-user/www/mysite/releases/159/wp-content/plugins/sitepress-multilingual-cms/classes/utilities/class-wpml-locale.php(106): SitePress->get_current_language()
#1 /home/wp-user/www/mysite/releases/159/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(3452): WPML_Locale->locale()
#2 /home/wp-user/www/mysite/releases/159/wp-includes/class-wp-hook.php(308): SitePress->locale_filter()
#3 /home/wp-user/www/mysite/releases/159/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#4 /home/wp-user/www/mysite/releases/159/wp-includes/l10n.php(80): apply_filters()
#5 /home/wp-user/www/mysite/releases/159/wp-includes/l10n.php(139): get_locale()
#6 /home/wp-user/www/mysite/releases/159/wp-includes/l10n.php(8" while reading response header from upstream, client: 66.249.70.8, server: staging.mysite.com, request: "GET /insights/da-design-sprint-a-uqido-deep-dive/ HTTP/1.1", upstream: "hidden link:", host: "staging.mysite.com"

One more thing: when I got the error if I delete the wpml plugin folder I gain access to the backend and then I can reinstall it from OTGS installer. And then it works.
Actually there is no difference in the files loaded.

August 2, 2023 at 1:44 pm #14142989

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

What about "wp-content/plugins/sitepress-multilingual-cms/vendor/composer/../../classes/language/Detection/CookieLanguage.php", it would seem that after git update is not there?

Can you check if these files are indeed missing and if no, sync them as well?

Regards,
Bruno Kos

The topic ‘[Closed] Error when plugin deployed using git’ is closed to new replies.