Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client was experiencing an 'Internal Server Error' on their website. After the hosting support suggested changes to the .htaccess file, the website pages started working correctly, but the string translation language change function stopped working.

Solution:
First, we recommended testing in a minimal environment with only WPML plugins enabled and a default theme, preferably on a staging site. We also advised enabling debug mode by adding the following code to the wp-config.php file:

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );

// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );

// Disable display of errors and warnings 
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( 'SCRIPT_DEBUG', true );

We provided links to WordPress debugging documentation:

After enabling debugging, we asked the client to reproduce the issue and check for a debug.log file in the wp-content folder, and to look for any errors in the browser dev tools console.

Additionally, we suggested checking the following solution regarding .htaccess issues with WPML:
https://wpml.org/faq/why-is-htaccess-getting-overwritten-with-the-language-folder-on-my-wpml-website/

If the solution provided here is not relevant due to being outdated or not applicable to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please open a new support ticket in the WPML support forum.

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.

This topic contains 11 replies, has 3 voices.

Last updated by Andrey 1 year, 3 months ago.

Assisted by: Andrey.

Author Posts
March 23, 2024 at 3:04 pm #15443239

irynaK-2

Hello.
I need your help.

A few days ago, pages on the site stopped loading and displayed the following error:

"Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at server@admin.com to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request."

I asked hosting technical support for help and this is what they replied:

"Your language plugins generated incorrect directives."

We changed the line in the .htaccess file located in the root directory of the site
RewriteBase /en/
on
RewriteBase /

And also changed
RewriteRule . /en/index.php [L]
on
RewriteRule . /index.php [L]

And after that, all pages work correctly and we continued the translation.
But now it turns out that the function of changing the language in string translation has stopped working. This function is needed because the site is in Ukrainian by default, but the theme is installed in English. And in order to change these lines from the topic from English to Ukrainian, I changed the line to any other third language and then wrote the correct options in Ukrainian and English.

I’m not sure that the history of changes in the .htaccess file is related to the fact that the function for changing the language in string translation now does not work, but since the function stopped working after changes in .htaccess, perhaps this is connected.

I really need help in resolving this issue.

Знімок екрана 2024-03-23 170141.png
March 24, 2024 at 9:48 pm #15444424

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Before your ticket is assigned to one of my colleagues, please allow me to walk you through some initial debugging steps. This will help speed up the support process.

Are you able to test it in a minimal environment, to see if you're able to change the language of that string with only WPML plugins enabled and a default theme? If possible, please try it in a staging site to not affect the live site.

In addition to that, I'd like your help enabling the debug mode, please add the following code to the wp-config.php file:

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
  
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
  
// Disable display of errors and warnings 
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
  
// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( 'SCRIPT_DEBUG', true );

Please check following links to read more about debugging with WordPress.
- https://codex.wordpress.org/Debugging_in_WordPress
- https://codex.wordpress.org/Debugging_in_WordPress#Example_wp-config.php_for_Debugging

After adding the code above, please try to reproduce the issue again and check if you'll find a debug.log file inside the wp-content folder.

If you locate it there, please send us the last lines here in the ticket.

Also, please open the browser dev tools and see if there are any errors in the console.

After you send us the error and the WP debug logs, we'll analyze them and get back to you with further steps.

Looking forward to helping you resolve this issue.

March 28, 2024 at 6:40 pm #15462010

irynaK-2

I did everything as you wrote.
After I added this code to wp-config.php, the ability to select a category disappeared. The screenshot shows that it does not find categories, although they are there.
Then I tried to at least create one for all products, without dividing them into categories, but it gave me the error “Something went wrong with the creation of the layout!” Second screen.

Therefore, I could not repeat the problem. And the debug.log file is missing.

I made a copy of the site so as not to break the main one.
I don’t see the opportunity to write in private mode, I would like to write you the address, login and password.

I really hope for some help, otherwise I will have to abandon the plugin. Unfortunately, this is not the first time that we have had incomprehensible problems, although everything should be easy.

Знімок екрана 2024-03-28 201755.png
2024-03-28 201454.png
March 28, 2024 at 9:41 pm #15462686

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

You have reported that the .htaccess changes from time to time cause the server error on the website. You can try the following solution: https://wpml.org/faq/why-is-htaccess-getting-overwritten-with-the-language-folder-on-my-wpml-website/.

If you delete the code from wp-config.php, can you select a category? Please explain the issue you are currently facing.

March 30, 2024 at 1:47 pm #15466286

irynaK-2

Здравствуйте, Андрей.
Если не добавлять код в wp-config.php, то категории есть в выпадающем списке.

Сделала все по этой статье:
https://wpml.org/faq/why-is-htaccess-getting-overwritten-with-the-language-folder-on-my-wpml-website/
Ничего не изменилось.
Все также перевод не добавляется.

Сегодня увидела в разделе "Поддержка" плагина WPML в ведомостях, что WooCommerce Multilingual не установлен. Но это не так - он есть в плагинах, включен, отображается в панели Вордпресса слева со всеми своими функциями (скрин прилагаю).

Скопировала сайт на поддомен, отключила все плагины кроме минимально необходимых:
WPML (и все что с ним шли)
Elementor и Woodmart Core (они обязательны для темы Woodmart)
WooCommerce (именно макеты от Woodmart для WooCommerce и не получается перевести, конкретно макеты Single product layout.

Начались проблемы с того что WPML сформировал некорректные директивы в .htaccess

У меня несколько заказов висит, которым нужен плагин перевода.
И я хотела купить Multilingual Agency.
Но сейчас в растерянности, не понимаю как заставить WPML работать или что ему мешает.

2024-03-30 150152.png
April 1, 2024 at 11:45 am #15468999

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Спасибо за информацию.


Начались проблемы с того что WPML сформировал некорректные директивы в .htaccess

Это проблема решается по ссылке Выше.

Очень странно, что WooCommerce Multilingual не отображается, как активированный.

Мне нужно запросить временный доступ (WP-администратора и FTP) на Ваш сайт - предпочтительно к тестовому сайту, где проблема была воспроизведена, если это возможно - для того, чтобы лучше помочь. Вы найдете необходимые поля ниже поля для комментариев, когда Вы войдете, чтобы оставить свой следующий ответ. Информацию, которую Вы ведете является частной, что означает только Вы и я могу видеть и иметь доступ к ней.

April 2, 2024 at 2:41 pm #15473740

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Спасибо за доступы. Я все проверил и также установил новые версии плагинов WPML. WooCommerce Multilingual & Multicurrency работает на Вашем тестовом сайте.

Насколько я вижу, WPML в целом работает должным образом. Не могли бы Вы указать в чем именно заключается проблема?

April 3, 2024 at 3:01 pm #15479146

irynaK-2

Проблема:
В теме WoodMart, в Layouts, в Single product не получается сделать перевод.
Когда делаю перевод и сохраняю - отображаются стрелочки, крутящиеся по кругу (скрин).
И на самом сайте не отображается перевод.
На втором скрине видно что перевод в процессе.

Знімок екрана 2024-03-27 185211.png
Знімок екрана 2024-03-27 184825.png
April 3, 2024 at 4:07 pm #15479540

irynaK-2

Вроде решила проблему и работает сейчас.
Возможно в будущем кому-то это поможет при такой же проблеме.

Проблема была в реакции темы WoodMart или плагина WPML на Redis.

Чтобы исправить проблему нужно было:
1. Отключить плагин Redis на сайте (но этого недостаточно).
2. Обязательно удалить код Redis из wp-config.php

April 4, 2024 at 2:06 pm #15484018

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Супер! Я рад, что проблема была решена. Если возникнут новые вопросы по работе с WPML, Вы всегда сможете открыть новый билет детально описав проблему.

April 7, 2024 at 3:00 pm #15491729
irynaK-2

Здравствуйте, Андрей.

1. Могли бы вы подсказать, пожалуйста почему блок с фильтром не появляется в переводах?

Оригинал сайта на украинском языке и фильтры здесь отображаются: hidden link

Но при переходе на русский или английский фильтра нет:
hidden link
hidden link

В виджетах поставлено "Все языки".
Все таксономии переведены.
Макет "Product archive layout" переведен.

2. В String Translation не находит слова "Ціна", хотя в "Локализации теми и плагинов" просканировала тему и дочернюю тему, которые выводят этот виджет.

April 8, 2024 at 7:30 pm #15495949

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Здравствуйте,

Рад слышать, что теперь это работает. Так как исходной проблемы больше нет, я открыл для Вас новый билет для каждого нового вопроса, отвечу в каждом. Это также поможет другим пользователям с подобными проблемами найти решение при поиске на форуме.

1) https://wpml.org/forums/topic/split-почему-блок-с-фильтром-не-появляется/

2) https://wpml.org/forums/topic/split-в-string-translation-не-находит-слова-ціна/