diff -u b/src/Form/JobItemForm.php b/src/Form/JobItemForm.php --- b/src/Form/JobItemForm.php +++ b/src/Form/JobItemForm.php @@ -335,17 +335,21 @@ // Update the translation, this will only update the translation in case // it has changed. We have two different cases, the first is for nested // texts. - $text = is_array($value['translation']) ? $value['translation']['value'] : $value['translation']; + $original_text = is_array($value['translation']) ? $value['translation']['value'] : $value['translation']; + $text = $original_text; + if ($text == '') { + $text = ''; // empty segment-only tags + } + // Initialise the empty translation with empty segment-only tags. + // Otherwise mask the translation's HTML tags. $data_item = $item->getData($data_service->ensureArrayKey($key)); - - // Mask the translation's HTML tags. \Drupal::moduleHandler()->alter('tmgmt_data_item_text_input', $text, $data_item, $item); $data = [ '#text' => $text, '#origin' => 'local', ]; - if ($data['#text'] == '' && $item->isActive() && $form_state->getTriggeringElement()['#value'] != '✓') { + if ($original_text == '' && $item->isActive() && $form_state->getTriggeringElement()['#value'] != '✓') { $data = NULL; continue; } only in patch2: unchanged: --- a/src/Entity/Job.php +++ b/src/Entity/Job.php @@ -708,12 +708,7 @@ class Job extends ContentEntityBase implements EntityOwnerInterface, JobInterfac // We don't know if the translator plugin already processed our // translation request after this point. That means that the plugin has to // set the 'submitted', 'needs review', etc. states on its own. - if (!empty($this->getItems())) { - $this->getTranslatorPlugin()->requestTranslation($this); - } - else { - $this->submitted(); - } + $this->getTranslatorPlugin()->requestTranslation($this); // Reset it again so getData returns again all the values. $this->filterTranslatedItems = FALSE;