WPML
Status
Resolved
Reported for
WPML Multilingual CMS 4.5.14
Topic tags
Bug, Known issue

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

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"]);
                    }

All known issues →