Skip Navigation

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 10 replies, has 3 voices.

Last updated by alexeyK-12 1 year, 7 months ago.

Assisted by: Christopher Amirian.

Author Posts
April 7, 2023 at 7:10 pm #13429003

alexeyK-12

hidden link
hidden link

I changed the name of the language and I lost the content on the translation pages

April 7, 2023 at 9:28 pm #13429185

Ahmed Mohammed
Supporter

Timezone: Africa/Cairo (GMT+02:00)

Hi there,

Thank you for contacting WPML support!

I understand you changed a language name in the WPML settings and the translated pages stopped showing content.

I checked the translated version of the website and not only the content of the translated pages is missing, but the pages don't even load the footer.

I suspect a fatal/critical error prevents the pages from loading correctly.

The issue you are experiencing would be localizable if you activate the WP Debug Mode in your wp-config.php file.

WordPress includes a debug mode that helps reveal PHP problems.

To enable it, open your wp-config.php file and look for

define('WP_DEBUG', false);

Change it to:

define('WP_DEBUG', true);

To enable the error logging to a file on the server, you need to add yet one more similar line:

define( 'WP_DEBUG_LOG', true );

In this case the errors will be saved to a debug.log log file inside the /wp-content/directory.

Depending on whether you want your errors to be only logged or also displayed on the screen, you should also have this line there immediately after the line mentioned above:

define( 'WP_DEBUG_DISPLAY', true );

The wp-config.php is located in your WordPress root directory. It’s the same file where the database configuration settings are. You will have to access it by FTP or SFTP in order to edit it.
If you open wp-config.php and that define statement is not there, you can add it right before this line:

/* That's all, stop editing! Happy blogging. */

Please note that you’ll see everything, not only related to our Plugins.
This will most likely include messages from other plugins, your theme, and sometimes even WordPress core. The messages appear all over the place.
Sometimes they appear right on top, but they can also appear in the middle of the page.

DOC:
https://codex.wordpress.org/Debugging_in_WordPress

After enabling the debug mode, please try to replicate the issue by visiting any of the affected pages. The errors will be either displayed on the screen or logged in the debug.log log file inside the /wp-content/directory.

Looking forward to hearing back from you.

April 8, 2023 at 7:24 am #13430885

alexeyK-12

I added these lines, but debug.log was not created

April 8, 2023 at 12:55 pm #13431361

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

By changed language name you mean you went to WPML > Languages > Edit Languages (link) and changed the name of the language in the table? (check screenshot)

Or you used another method to do so?

Also what happens if you being back the name of the language to what it was before?

Finally, what happens if you follow the steps below:

- IMPORTANT STEP! Create a backup of your website.
- Go to "WordPress Dashboard > WPML > Support > Troubleshooting (link)".
- Click the buttons annotated in the screenshot below one by one and wait for each button process to finish:

https://wpml.org/wp-content/uploads/2020/10/7206941-buttons.png

Do not follow the steps above before having a complete backup of the website.

Screenshot 2023-04-08 at 16.53.23.png
April 8, 2023 at 6:39 pm #13431945

alexeyK-12

When you press the buttons, this message appears.
hidden link

and the content is still empty
hidden link

April 9, 2023 at 7:24 am #13433517

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

That is ok.

You did not answer if you change the language name to what it was before what happens?

Also I need more detailed steps on how you change the language name? I asked about that but you did not answer.

So I'd appreciate it that you give as much details as you can so we can move forward helping you:

- How you have changed the language name? (Give step by step)
- What happens if you change back the language name to what it was before? (Is the content empty still?)
- You use difference domains per language mode in WPML > Languages > language URL Format. Please test what happens if you change that:
- IMPORTANT STEP! Create a backup of your website.
- Go to "WordPress Dashboard > WPML > Languages > Language URL Format".
- Check the "Different languages in directories" checkbox.
- Click the "Save" button.
- Go to "WordPress Dashboard > Settings > Permalinks".
- Click the "Save" button to flush the permalinks cache.

Make sure that you have a backup before following the steps above and I'd appreciate it if you could give more details on what you have done as asked so I have a better idea about the issue.

Thank you.

April 9, 2023 at 8:16 am #13433561

alexeyK-12

I did everything you said but it didn't work, then I switched from child theme to main theme and the translations worked.
not sure how to make your plugin work with my child theme?

April 9, 2023 at 2:16 pm #13434255

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

Please check with the steps below to see what is causing on your Child Theme code to have an issue with WPML:

- IMPORTANT STEP! Create a backup of your website.
- Remove all the additional code inside functions.php of your child theme.
- Remove any file overrides that you have on your child theme.
- See if it works ok.
- If yes, bring bac the codes one by one to see which code is causing the issue.

Thanks.

April 9, 2023 at 2:20 pm #13434283

alexeyK-12

My child theme is missing custom code and files

hidden link

April 9, 2023 at 3:02 pm #13434323

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

Would you please provide the staging version of your website by setting the next reply as private to be able to do troubleshooting without the fear of ruining a live website.

Alternatively, we can give you the means to copy your website to our server it that is what you prefer.

Thanks.