Skip Navigation

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

Problem: Unable to translate the Post or Page from Translation Editor

Solution: While translating a Post or Page from Translation Editor we will be directed to WPML>>Translations page. It was happening because of mixed collation of Database tables and String Translation tables are missing in the database. It worked fine after the following steps.

1) Upgrade to the latest version of WPML plugins(3.7 series)

2) Upgrade WooCommerce to the latest version

3) Upgrade WPBakery Visual Composer to the latest version

4) Change the DB collation of your Database and table to *utf8mb4_unicode_ci* like the following. Becuase now your tables having mixed DB collation.

# For each database:
ALTER DATABASE database_name CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
# For each table:
ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
Check the following tutorial for more details and example.
[php]

https://mathiasbynens.be/notes/mysql-utf8mb4

5) Then add the following code in functions.php of your theme

[php]
function wpml_fix_missing_icl_tables() {
   
    if( function_exists( 'icl_sitepress_activate' ) )
   
        icl_sitepress_activate();
   
}
   
add_action( 'wp_footer', 'wpml_fix_missing_icl_tables' );

6) Visit the home page, then confirm in your database that String Translation tables are created

7) After that, you can remove the above code from functions.php of your theme

8) Then run the following query in Database to add a missing field to icl_translation_status table. Replace *your-db-prefix* with your Database prefix for an example wp.

ALTER TABLE `*your-db-prefix*_icl_translation_status` ADD `batch_id` INT(11) NOT NULL AFTER `translation_service`;

9) Please check you can translate a Post/Page/Product

Relevant Documentation: https://mathiasbynens.be/notes/mysql-utf8mb4

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

Last updated by tchungL 4 years, 4 months ago.

Assigned support staff: Bigul.

Author Posts
May 8, 2017 at 5:45 pm #1271102

marcp-21

Hi,

After editing wp-config.php to activate debug.log and trying to edit german translation of one of our products without success, there is no debug.log created

Best

May 9, 2017 at 12:29 pm #1271721

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi,

I can replicate the issue on *atelierhaussmann[dot]de[dot]w0120165[dot]kasserver[dot]com*. I made a new duplicator copy now and will debug it locally soon. Please wait.

--
With Regards

Bigul

May 10, 2017 at 2:21 pm #1272892

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi,

It is happening because *batch_id* field of *icl_translation_status* table is missing. Please runs the following query in Database to add the missing field to *icl_translation_status* table. Replace *your-db-prefix* with your Database table prefix. For an example wp.

ALTER TABLE `*your-db-prefix*_icl_translation_status` ADD `batch_id` INT(11) NOT NULL AFTER `translation_service`;

Please check the attached images for more details and let me know your feedback.

--
With Regards

Bigul

2017-05-10_1943.png
2017-05-10_1945.png
May 10, 2017 at 3:54 pm #1273014

marcp-21

Hi Bigul,

Thank you so much !
After ran the query I'm now able to edit my translations either it's a page or a product.

I though I ran this query when you gave me the step to step, I must have forgot to replace the db-prefix...
If it's the case I apologize

Thanks a lot for your time and your help to fix that !

Best

July 2, 2018 at 6:08 am #2449815

tchungL

Hi dear i have been migrate my itour.com.au to other hosting company , and can't re register again ? all way show up (invalid site key for the current site.) what can i fix this problem?