Skip Navigation

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

Problem:

Advanced Translation Editor - although the translation is complete, it does not show on the front end, and the pencil icon never shows. In WordPress's debug.log, the following fatal error shows.

PHP Fatal error:  Uncaught Error: Call to a member function get_source_language_code() on bool in /public_html/wp-content/plugins/sitepress-multilingual-cms/inc/functions-load-tm.php:496

Solution:

1. Take a complete backup of the DB of your site.

2. Connect to the DB and run the following queries.

DELETE FROM `wp_icl_translations` WHERE `element_id` IS NULL

Then

DELETE FROM `wp_icl_translations` WHERE `source_language_code` = 'all'

3. Go to WPML-> Support-> Troubleshooting and click the "Set language information" button. And wait for the process to finish.

4. Check if now this problem is solved on your site.

**** Important! Please make a full site backup (files and DB) before you proceed with those steps****

If you are unsure that this is the same problem you are experiencing, please open a new ticket in our 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.

Tagged: 

This topic contains 20 replies, has 2 voices.

Last updated by Itamar 1 year, 6 months ago.

Assisted by: Itamar.

Author Posts
April 27, 2023 at 10:14 am #13548615

ahfA

I am trying to translate but the same , i translate with advanced translator and my translator page dont show and dont link with the origin page.

for example: i publish this product
hidden link

i translated with advances translator and click done and complete , now it dont show.

Although, I am sending email that is coming from wordpress.
WordPress has a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.

In this case, WordPress caught an error with one of your plugins, WPML Multilingual CMS.

First, visit your website (hidden link) and check for any visible issues. Next, visit the page where the error was caught (hidden link) and check for any visible issues.

Please contact your host for assistance with investigating this issue further.

If your site appears broken and you can't access your dashboard normally, WordPress now has a special "recovery mode". This lets you safely login to your dashboard and investigate further.

hidden link

To keep your site safe, this link will expire in 1 day. Don't worry about that, though: a new link will be emailed to you if the error occurs again after it expires.

When seeking help with this issue, you may be asked for some of the following information:
WordPress version 6.2
Active theme: AHF Aksesore Mobilerie (version 3.0)
Current plugin: WPML Multilingual CMS (version 4.6.3)

April 30, 2023 at 4:41 pm #13562995

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi,

Could you please share your site's Debug information with me?

You can read about it here.

http://wpml.org/faq/provide-debug-information-faster-support/

Thanks,
Itamar.

May 2, 2023 at 12:20 pm #13570531

ahfA

Hello, above I've given you the debug info.

Also I have to tell that I've created a few new products these days and still the translator is not working.

May 2, 2023 at 1:56 pm #13571299

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi, and thanks for sharing with me the debug information.

You wrote:

Also I have to tell that I've created a few new products these days and still the translator is not working.

Did the fatal error occur right after you tried to translate a page?

Can you please share with me the full error message that occurred?

Or if a fatal error is not occurring anymore, what happens when you try to translate a page?
Please share a screenshot with me.

Thanks,
Itamar.

May 3, 2023 at 11:01 am #13577865

ahfA

Hello

The error happens when I add a new product to my page. It wont be translated even after a few days, still it wont be translated to English.

You can check it: hidden link

You can try to translate it to english

May 3, 2023 at 11:19 am #13577951

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi, and thanks for the extra information.

If you need further help with this, please share the access details to your site with me.
I'm enabling a private message for the following reply.

Privacy and Security Policy
We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/
**IMPORTANT**
- - Please backup the site files and database before providing us access. --
-- If you have a staging site where the problem can be reproduced, it is better to share access to the staging site.--

Regards,
Itamar.

May 9, 2023 at 7:43 am #13610471

ahfA

Hi, I just added the ip to the sucuri. Thanks

May 9, 2023 at 9:36 am #13611913

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi, and thanks for the access details.

I see you are using the automatic translation payment option of Pay-as-you-go. This means you will be charged monthly according to the number of translation credits you have used. There is no problem here. It is a good choice to use.

In WPML -> Settings -> Translation Mode, I can see that you selected "Translate What You Choose". Please see the attached screenshot.

Do you expect to have all the content automatically translated without sending everything to translation from the Translation Management dashboard?

If so, please switch the Translation Mode to "Translate Everything Automatically". This will send all the remaining untranslated content to be automatically translated. You can read about it here.

https://wpml.org/documentation/automatic-translation/

Does this help to translate the remaining content, or is it still stuck and not getting translated?

Please be aware that the automatic translation process will take a while.

I'll wait for your reply.

Regards,
Itamar.

2023-05-09_12-19-26.jpg
May 9, 2023 at 10:46 am #13612683

ahfA

Then I have over 1 year of problems with wpml, with translation. The first 6 months that I bought it as a program, I translated everything and it was great. Now I have many problems.

1. In the beginning, I re-corrected all the products in translation as the translation from Albanian to English was not correct. But because I had left the automatic translation activated, every month wpml re-translated again and all the meaning of the content was lost. Your staff suggested me to use safe mode so that the program does not automatically translate the entire page because it is a colossal job for us to retranslate the products every month.

2. wpml does not have an option to save the translation that I did once per product.
for example In Albanian, the word "doreze" is translated as handle in English, while your program translates it to gloves.
I modify the translation from the word gloves and write handle, but after 1 month it returns glove again... and for this reason I have returned it to safe mode

3. now, I create the product, go and do the translation with the advanced method, but when I publish the product and when I change the language flag, it directs me to home, so the products in both languages ​​are not connected.

May 9, 2023 at 12:53 pm #13613941

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi, and thanks for elaborating on this problem.

I'm sorry for missing this point, as you already wrote about it. I'll now address each point you brought up in your last reply.

1. In the beginning, I re-corrected all the products in translation as the translation from Albanian to English was not correct. But because I had left the automatic translation activated, every month wpml re-translated again and all the meaning of the content was lost. Your staff suggested me to use safe mode so that the program does not automatically translate the entire page because it is a colossal job for us to retranslate the products every month.

This can happen only if you changed the original Albanian content. In that case, WPML noticed a change in the original language and sent the content to be translated automatically. If you only change part of the content in the original language, only that specific will get re-translated automatically.

2. wpml does not have an option to save the translation that I did once per product.
for example In Albanian, the word "doreze" is translated as handle in English, while your program translates it to gloves.
I modify the translation from the word gloves and write handle, but after 1 month it returns glove again... and for this reason I have returned it to safe mode

I can see that in WPML -> Translation Management -> Tools -> Glossary, you have added the translation for Dorezë = hANDLE and dorezë = HANDLE. Please see the attached screenshots. So if this problem happened when exactly the same words in Albanian (Dorezë, dorezë) were included in the content, it is wrong and shouldn't have happened. Please note that the word must be exactly the same to have the glossary applied in the automatic translation. You can read about it here.

https://wpml.org/documentation/translating-your-contents/advanced-translation-editor/how-to-create-and-manage-glossary-entries/

So if, for example, in the content, you have "doreze" with regular "e" and not with "ë" then this problem could have happened.

But for now, let's, please focus on the main issue of this ticket.

3. now, I create the product, go and do the translation with the advanced method, but when I publish the product and when I change the language flag, it directs me to home, so the products in both languages ​​are not connected.

What should I do to see this problem?
Should I translate a product that is not yet translated?
For example, this product, hidden link

Regards,
Itamar.

2023-05-09_15-36-29.jpg
2023-05-09_15-35-36.jpg
May 11, 2023 at 1:28 pm #13630865

ahfA

Hello,

then I did a test with the Cleaf jiometri product and again the same problem, I give complete translation and update the product and again it does not receive the translation.

hidden link

May 11, 2023 at 2:01 pm #13631067

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Thanks for sharing the video with me.

I can see this problem on your site. I recorded a video while I was checking it. You can see the video here.

hidden link

There seem to be some issues on your site with WPML's Advanced Translation Editor. I'm consulting our second-tier supporters about this issue and will get back to you once I have news from them.

I appreciate your patience.

Regards,
Itamar.

May 11, 2023 at 2:35 pm #13631211

ahfA

thank you very much for support, i am waiting your solve.

May 14, 2023 at 9:54 am #13642325

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi,

Following instructions from our second-tier supporter, I passed him the errors I found in WPML -> Support -> Advanced Translation Editor (error log). And also found and reported the following fatal error.

PHP Fatal error:  Uncaught Error: Call to a member function get_source_language_code() on bool in /wp-content/plugins/sitepress-multilingual-cms/inc/functions-load-tm.php:496

I'm waiting for a response from our second-tier supporter regarding those findings.

Meanwhile, our second-tier supporter also asks to try the following.

1. If you can, create a new test product and see if you can translate it.

2. Check if you can translate products in a minimal environment. we suspect that there is a collision with the theme or another plugin that might cause this problem. If possible, get your site into a minimum environment. Minimum environment means switching to a default WordPress theme like TwentyTwenty-One and no plugins activated except WPML.

First, you will need to check if the problem persists when just the theme is switched to TwentyTwenty-One (for example). If it persists, deactivate all plugins except the WPML, its add-ons, and WooCommerce itself (without its extensions). Then please check if the problem persists. If it does not persist, start by activating the plugins one by one and check when the problem comes back, then report to me which was the culprit plugin.

**** Important! Please make a full site backup (files and DB) before you proceed with those steps****


*** If your site is live, you might want to try those procedures in a staging environment or a snapshot of your site on your local server or another server. ***

Please report to us your findings.

Regards,
Itamar.

May 16, 2023 at 8:23 am #13653223

ahfA

Helo,

I make video all my actions but the same

hidden link

and when i change the theme is the same , and when i deactivate all plugins is the same