Skip Navigation

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

Problem:
The client is experiencing a critical uncaught error when trying to translate content using WPML's translation editor. The error is due to a corrupted database missing some columns.
Solution:
1. Compare your database structure with the expected WPML database model. You can check the model here: WPML Database Model.
>
2. Ensure that the user role has translator permissions and make a minor edit to the default language page before attempting to translate.
3. Check the debug log for any additional missing tables and create them as needed.

If this solution does not resolve your issue, or if it seems outdated or irrelevant 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 further assistance is needed, please open a new support ticket at 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.

Tagged: 

This topic contains 0 reply, has 0 voices.

Last updated by ingeS-3 5 months, 1 week ago.

Assisted by: Dražen.

Author Posts
December 11, 2024 at 9:26 am

ingeS-3

Background of the issue:
I am trying to translate content such as products, pages, and posts on my site hidden link using WPML's translation editor. I have already attempted various troubleshooting steps, including using the cleaning/fixing options on the troubleshooting page, creating a copy of the webshop to test with all other plugins turned off, and deleting and re-adding translators. My site's memory is 256MB with a max memory of 2048MB, and mbstring is active. The error appears in the logs as: 2024-12-10T14:50:17+00:00 Kritiek Uncaught Error: Call to a member function get_source_language_code() on bool in /home/***/public_html/preview/dexitest/wp-content/plugins/sitepress-multilingual-cms/inc/functions-load-tm.php:501.

Symptoms:
I always get a critical uncaught error when trying to translate content with WPML's translation editor.

Questions:
What could be causing the critical uncaught error when using WPML's translation editor?
Are there any additional troubleshooting steps I can take to resolve this error?

December 11, 2024 at 9:54 am
December 11, 2024 at 10:06 am #16502659

Dražen
Supporter

Languages: English (English )

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

Hello,

this is the ticket. I checked the debug log and seems your database is corrupted and missing some columns.

Can you please check and compare and make sure it has all columns as in the image share? If you can create them, if not let us know and I will check further with our 2nd tier.

hidden link

Regards,
Drazen

December 17, 2024 at 12:35 pm #16521651

ingeS-3

Hello,

I checked the database, both the live site and the staging copy. As far as i was able to see all table values are present with correct name and type. I made screenshots and collected them in a picture, added as a attachment to this message.

databse dexitex WPML 2.jpg
December 17, 2024 at 1:08 pm #16521868

Dražen
Supporter

Languages: English (English )

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

Hello,

thanks, I have escalated this ticket to our 2nd tier to further check.

Regards,
Drazen

December 18, 2024 at 6:35 am #16524236

Dražen
Supporter

Languages: English (English )

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

Hello,

Some are still missing tables, this SQL should do the job:

ALTER TABLE txbr_icl_translate_job
ADD COLUMN automatic tinyint(3) unsigned DEFAULT 0,
ADD COLUMN ate_sync_count int(6) unsigned DEFAULT 0;

You can apply yourself or let us know if you have a backup and is okay for us to apply the same.

Regards,
Drazen

December 18, 2024 at 8:47 am #16524748

ingeS-3

Goodmorning,

I've added them to the table. But unfortunately i still get the same crit error when trying to start a new translation.

Schermafbeelding 2024-12-18 094345.jpg
December 18, 2024 at 8:53 am #16524777

Dražen
Supporter

Languages: English (English )

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

Hello,

thanks for getting back.

I have checked and created 2 missing tables, it seems to work fine now.

Please check.

Regards,
Drazen

December 18, 2024 at 9:19 am #16524833

ingeS-3

When i hit the + i still get a crit error (i added screenshot attachment). When i hit a product with the two round arrows i go to the "translations in queue" page thats empty.

The existing translations where done with the standard wordpress editor by our client. We want to translate the rest with the WPML service using credits.

Schermafbeelding 2024-12-18 101305.jpg
December 18, 2024 at 9:34 am #16524903

Dražen
Supporter

Languages: English (English )

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

Hello,

I just tested and it works fine for pages that use WP editor. Make sure your user is a translator and you make a small change to the default language page and then click.

For others that are not working I see still missing tables from error, please check the debug log and create them, or let us know if it is okay for us to adjust it for you.

For example, icl_translation_status is missing some tables.

Let us know how it goes.

Regards,
Drazen

Table_ wp_icl_translation_status - AdminerEvo.jpg
December 18, 2024 at 9:47 am #16524975

ingeS-3

It's ok for you to add the missing tables if you can, thank you.

December 18, 2024 at 9:58 am #16525073

Dražen
Supporter

Languages: English (English )

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

Hello,

thanks, we will check and get back to you.

Regards,
Drazen

December 18, 2024 at 11:05 am #16525346

Dražen
Supporter

Languages: English (English )

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

Hello,

thanks, please check now it should work fine, I was able to open the WPML editor.

Regards,
Drazen

December 18, 2024 at 12:53 pm #16526044

ingeS-3

I cross checked the database from staging with the live site and made the same changes. The live site now also works.

Thanks for the help