diff -u b/src/Form/JobItemForm.php b/src/Form/JobItemForm.php --- b/src/Form/JobItemForm.php +++ b/src/Form/JobItemForm.php @@ -201,13 +201,13 @@ $source_ui = $this->sourceManager->createUIInstance($item->getPlugin()); $source_ui->reviewFormValidate($form, $form_state, $item); // Invoke the validation method on the translator controller (if available). - if (!$item->hasTranslator()) { - $form_state->setErrorByName('accept', $this->t('The job item could not be saved because the job does not have a translator assigned.')); - - if ($item->getTranslator()) { + if ($item->hasTranslator()) { $translator_ui = $this->translatorManager->createUIInstance($item->getTranslator()->getPluginId()); $translator_ui->reviewFormValidate($form, $form_state, $item); } + else { + $form_state->setErrorByName('accept', $this->t('The job item could not be saved because the job does not have a translator assigned.')); + } foreach ($form_state->getValues() as $key => $value) { if (is_array($value) && isset($value['translation'])) { // If there is an empty field then sets and error to fill it.