WPML

Overview of the Issue

When you save a translation of a multiline element using Classic Translation Editor, the line breaks are removed and the translation appears as a single line.

Workaround

This issue is fixed. Updating to the latest version solves it on your site, so you only need this workaround if you can’t update yet.

Be sure to create a full backup of your site before proceeding.

  1. Go to: wp-content/plugins/wpml-string-translation/classes/class-wpml-st-string.php
  2. After the code:
    if ( ! empty( $translation_data ) ) {
    Add this code:
    if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "wpml_save_job_ajax" && preg_match('/[nr]/', $translation_data["value"])) {
        $translation_data["value"] = wpautop($translation_data["value"]);
    }

Still Seeing This Issue?

If updating doesn’t fix it, ask a support question and we’ll look into it with you.

Ask a support question

All known issues