Open
Reported for: WPML Multilingual CMS 4.5.14
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.
- Go to: wp-content/plugins/wpml-string-translation/classes/class-wpml-st-string.php
- 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"]); }
Hi we tried it…It works, but it also puts things on other elementor sites, like videos get hidden because it saves it as text.
Hello Peter,
Could you please open a chat in our support so we can investigate it? So far we don’t have similar reports.
Otherwise, also consider using our Advanced Translation Editor.
Regards