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.

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)

Tagged: 

This topic contains 21 replies, has 0 voices.

Last updated by Bruno Kos 2 days, 17 hours ago.

Assisted by: Bruno Kos.

Author Posts
May 8, 2025 at 7:12 am #17010001

kellyS-6

Background of the issue:
I am trying to translate pages using WPML and access the Translation Management section. We encountered repeated fatal errors during these attempts. We have tried using the cleanup tools in WPML > Support > Troubleshooting, but the issue persists. We also checked the database schema and found that there is no column named batch_id in the translation_status table.

Symptoms:
PHP Fatal error: Uncaught InvalidArgumentException: Unknown column: rid or invalid id: 0 in .../class-wpml-tm-icl-translation-status.php:36. PHP Fatal error: Uncaught WPMLCorePortPersistenceExceptionDatabaseErrorException: Unknown column 'ts.batch_id' in 'on clause' in .../QueryHandler.php:57.

Questions:
Could you please advise if there's a fix or database migration patch for this?

May 8, 2025 at 8:12 am #17010167

Bruno Kos
WPML Supporter since 12/2018

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

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

Hi,

batch_id should be there - see my screenshot on how this table should look like.

You could try adding it through cPanel e.g. or perhaps:

ALTER TABLE wp_icl_translation_status
ADD COLUMN batch_id INT NOT NULL DEFAULT 0;
rid.jpg
May 8, 2025 at 1:25 pm #17011975

kellyS-6

we have created the column using the given query but now when we try to translate a page we are facing below fatal error

WordPress database error Unknown column 'field_wrap_tag' in 'field list' for query INSERT INTO wp_icl_translate ......
PHP Fatal error: Uncaught Error: Call to a member function get_source_language_code() on bool in ....

May 9, 2025 at 7:04 am #17014721

Bruno Kos
WPML Supporter since 12/2018

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

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

Based on the errors you've shared, it seems the WPML database structure is incomplete or corrupted.

Since you've already tried using WPML’s troubleshooting tools and manually added the `batch_id` column without resolving the issue, I believe the core problem lies in an improper or incomplete initial setup.

If this is a new WPML installation and there are no existing translations that need to be preserved, I recommend performing a full reset of WPML. This will allow the plugin to recreate all necessary tables and start fresh, likely resolving the database-related fatal errors.

You can follow WPML’s official guide to perform the reset here:
https://wpml.org/documentation/getting-started-guide/language-setup/deleting-languages-and-plugin-data-by-doing-a-wpml-reset-on-your-site/#step-3-do-the-wpml-reset

May 9, 2025 at 7:14 am #17014755

kellyS-6

This is a old WPML Setup and it was working fine before this issue has surfaced recently in the site and i cannot reset it as the site currently has a lot of pages translated into multiple languages.

Is there anything else that we can try to resolve this issue ?

May 9, 2025 at 9:11 am #17015502

Bruno Kos
WPML Supporter since 12/2018

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

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

Something has corrupted these tables, and I'm afraid the only solution is to check and fix them manually.

I’ve created a sandbox site for this purpose:
hidden link

The "WP phpMyAdmin" plugin is available on the site, so you can use it to compare your broken tables with the correct structure and make the necessary fixes.

May 9, 2025 at 9:44 am #17015675

kellyS-6

So Creating missing columns should fix this issue without breaking already translated pages. is that correct ?

If yes then we will proceed with creating columns for which we face the issue.

May 9, 2025 at 10:32 am #17015964

Bruno Kos
WPML Supporter since 12/2018

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

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

That's correct, I see no other way. Perhaps it is the only column 'field_wrap_tag' missing and others are were not affected with this.

May 9, 2025 at 11:15 am #17016165

kellyS-6

We've created that column in the needed table now only this single error is

[09-May-2025 11:07:13 UTC] PHP Fatal error: Uncaught InvalidArgumentException: Unknown column: rid or invalid id: 0 in ..../wp-content/plugins/sitepress-multilingual-cms/classes/records/class-wpml-tm-icl-translation-status.php:36

Other than this there is no DB related error.

Can you suggest anything other than reseting the plugin as we cannot do that it will reset all the translations.

May 9, 2025 at 11:28 am #17016187

Bruno Kos
WPML Supporter since 12/2018

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

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

For the "rid" column within wp_icl_translation_status, is any value 0? If so, delete this row. Also make sure that there is AUTO_INCREMENT set for it (and other icl_ tables as well).

auto increment.jpg
May 9, 2025 at 11:43 am #17016292

kellyS-6

I've cheked rid is nowhere 0 and also that column is auto increment as well, too.

May 9, 2025 at 12:26 pm #17016608

Bruno Kos
WPML Supporter since 12/2018

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

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

Would you be willing to provide me with WordPress and FTP credentials so I could investigate the issue directly?

Also install https://wordpress.org/plugins/wp-phpmyadmin-extension/ or https://wordpress.org/plugins/pexlechris-adminer/

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

I marked your next reply as private so that you can safely add credentials.

And to confirm, the error would trigger if I enter any page and just click the + button so I could translate it, or something else needs to be done?

May 12, 2025 at 10:25 am #17022231

Bruno Kos
WPML Supporter since 12/2018

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

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

Can you install https://wordpress.org/plugins/wp-phpmyadmin-extension/ or https://wordpress.org/plugins/pexlechris-adminer/ so I could check database tables?

May 12, 2025 at 10:44 am #17022338

kellyS-6

Installed & Activated

May 13, 2025 at 12:20 pm #17027370

Bruno Kos
WPML Supporter since 12/2018

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

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

I am checking this with our 2nd tier and will keep you posted.