WPML
Status
Resolved

Overview of the issue

If you are using a page builder in your website, you may notice that if you add some emojis in a block of content, that block won’t be available for translation in the Advanced Translation Editor or Classic Translation Editor.

Workaround

This issue appears because of a table collation conflict. If your server supports the collation utf8mb4_general_ci, you can follow this procedure after making a full backup of your site:


  1. Open your theme’s functions.php file.

  2. Add this code:
    // Notice admin_init - will only run in backend
    add_action('admin_init', function() {
    	require_once(ABSPATH.'/wp-admin/includes/upgrade.php');
    	global $wpdb;
    	$mytables=$wpdb->get_results("SHOW TABLES");
    	foreach ($mytables as $mytable)
    	{
    	    foreach ($mytable as $t) 
    	    {       
    	        maybe_convert_table_to_utf8mb4( $t );
    	    }
    	}
    	
    });


  3. Visit any page in your site’s backend.

  4. Remove the code.

Your database tables collation should be utf8mb4_general_ci now, and the content will be available for translation.

In case your site’s database is using latin1 collation, you could apply the following workaround instead:


  1. Make a full backup of your site before proceeding.

  2. Go to: https://github.com/interconnectit/Search-Replace-DB.

  3. Download the ZIP file of the project and unzip it.

  4. Upload the unzip folder to your WordPress installation using a FTP client.

  5. Visit the folder – e.g. http://example.com/Search-Replace-DB-master/

  6. Fill out your database name, server, user and password. You can obtain those values from your wp-config.php file.

  7. Click and test the connection.

  8. Go to the bottom and click on the button ”Convert to UTF8MB4“.

  9. Wait for the process to finish.

  10. Once this is done click ”Delete me” button

 

All known issues →