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 2 years, 11 months ago.

Assigned support staff: Bigul.

Author Posts
April 26, 2017 at 12:41 pm #1262246

marcp-21

On a development version of my website I'm facing an issue with the product translation editor.
When I try to edit my translated product I land on the page shown on the attached screenshot.

So I cannot translate my variations.

Do you have any idea of what happens ?

Thanks a lot for your help

Best

April 27, 2017 at 10:34 am #1263157

Bigul
Supporter

Languages: English (English )

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

Hi ,

Thank you for contacting the WPML support. We are happy to help you.

Hope you have selected *Use the translation editor* option of WPML>>Translation Management>>Multilingual Content Setup>>How to translate posts and pages.

I have a request. Please try the following steps after a full site backup and make sure you are still having the issues.

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) Increase *WP Memory Limit* to *256*(the minimum required memory limit for WPML is *128*). Please check the following link for more details

https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP

5) Increase *MaxInputVars* of the PHP configuration settings to *5000* or more

For your kind updates, your theme *Fildisi* is not listed on the compatibility list for the theme - https://wpml.org/documentation/theme-compatibility. It does not mean that your theme is not compatible with WPML, but our compatibility team has not tested it yet.

--
With Regards

Bigul

April 28, 2017 at 8:58 am #1264102

marcp-21

Hi Bigul,

Thanks for your reply.

I will try to do all updates this afternoon however our running website uses same versions of these plugins and everything works well. In case of do you have idea ?

concerning point 4&5 I won't be able to edit these files as I don't access to them on our host.

Best

Marc

April 28, 2017 at 1:49 pm #1264355

marcp-21

Hi Bigul,

I tried to update these plugins but I cannot because my colleague who has access to the server to do that is off.
As I mentioned previously on our actual website the same plugin versions are running and everything works well.
What else might be the origine of tis issue ?
I can provide you an access to this development version is you need

Best

April 28, 2017 at 4:59 pm #1264526

Bigul
Supporter

Languages: English (English )

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

Hi ,

Thank you for the updates. I would like to access admin area of your site for further checking. Please fill the private details fields after a full site backup. Check the following links for more details about private information sharing.

hidden link

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

Please allow me to make a duplicator copy of your site using Duplicator plugin(https://wordpress.org/plugins/duplicator/) for debugging the issue locally.

--
With Regards

Bigul

May 1, 2017 at 7:31 am #1265279

Bigul
Supporter

Languages: English (English )

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

Hi,

Thank you for the login information. I made a duplicator copy of your site now. Will debug it locally and get back to you as soon as possible. Please wait.

--
With Regards

Bigul

May 1, 2017 at 8:32 am #1265298

marcp-21

Hi,

Thank you for your help on this issue

Best

May 2, 2017 at 11:33 am #1266135

Bigul
Supporter

Languages: English (English )

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

Hi,

For your kind information, the bug is existing after the initial debugging steps. It is happening because your Database is corrupted and somehow the String Translations table is missing in the Database. The result is same after I recreated the String Translation table and change the Collation of the table. Therefore I am forwarding the details to our second tier team.

Have you made any changes in Database?

--
With Regards

Bigul

May 2, 2017 at 1:09 pm #1266240

marcp-21

Hi,

Thank you for this first feedback.
As far as I know no change has been made in the Database

Best

May 3, 2017 at 6:41 am #1266807

Bigul
Supporter

Languages: English (English )

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

Hi,

Thank you for the confirmation. We are still working on the issue and get back to you as soon as possible. Please wait.

--
With Regards

Bigul

May 5, 2017 at 11:47 am #1269170

Bigul
Supporter

Languages: English (English )

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

Hi,

Please try the following steps after a full site backup and make sure you are still having the issues.

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.

hidden link

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

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

--
With Regards

Bigul

May 8, 2017 at 12:48 pm #1270719

marcp-21

Hi Bigul,

Thanks for feedback.
I'm trying to do your set-to-step but at the moment I can not change the collation pf my tabes.
Once I succeed I keep you up to date on the final result

Thanks again

Best

May 8, 2017 at 2:24 pm #1270870

Bigul
Supporter

Languages: English (English )

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

Hi,

Thank you for the updates. Waiting for your feedback.

--
With Regards

Bigul

May 8, 2017 at 2:40 pm #1270904

marcp-21

Hi,

I finally succeeded to update collation and after finished step 8, step 9 failed 🙁 nothing has changed

WPML and Visual Composer plugins are not updated at the moment because I need to update them from ftp directly but when I tried I cannot see them in the plugins directory.
But it should work even with these versions because it works well on our current website with the same versions.

Did I do something wrong ?

Best

May 8, 2017 at 4:02 pm #1271012

Bigul
Supporter

Languages: English (English )

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

Hi,

Thank you for the updates. It would be nice if you can provide me the WordPress debug.log (not WPML debug information). Please check this page for instructions https://wpml.org/documentation/support/debugging-wpml/

To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
 
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
 
// Disable display of errors and warnings 
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

In this case, the errors will be saved to a debug.log log file inside the /wp-content/directory. Please replicate the steps and check you are getting any errors or warning related to WPML in the log file.

If you can paste your debug.log to http://pastebin.com/index.php and provide me that link it would be great! (This is the cleanest way because sometimes the logs are long and create a complete mess in discussion).

--
With Regards

Bigul