diff -u b/src/Form/LingotekConfigManagementForm.php b/src/Form/LingotekConfigManagementForm.php --- b/src/Form/LingotekConfigManagementForm.php +++ b/src/Form/LingotekConfigManagementForm.php @@ -1999,10 +1999,10 @@ * @return \Drupal\lingotek\LingotekProfileInterface|null */ private function getProfile(LingotekConfigurationServiceInterface $lingotekConfiguration, object $mapper, ConfigEntityInterface | NULL $entity): LingotekProfileInterface|null { - if(!empty($entity)) { + if (!empty($entity)) { $profile = $mapper instanceof ConfigEntityMapper ? $lingotekConfiguration->getConfigEntityProfile($entity) : NULL; } - if(empty($profile)) { + if (empty($profile)) { /** @var ConfigEntityMapper $mapper */ $profile = $lingotekConfiguration->getConfigProfile($mapper->getPluginId(), FALSE); } @@ -2022,12 +2022,12 @@ * @return string|null */ -public function getDocumentId(LingotekConfigTranslationServiceInterface $translationService, object $mapper, ConfigEntityInterface $entity): ?string { + public function getDocumentId(LingotekConfigTranslationServiceInterface $translationService, object $mapper, ConfigEntityInterface | NULL $entity): ?string { $document_id = $mapper instanceof ConfigEntityMapper ? $this->translationService->getDocumentId($entity) : NULL; - if(empty($document_id)) { + if (empty($document_id)) { /** @var ConfigEntityMapper $mapper */ $document_id = $translationService->getConfigDocumentId($mapper); } - return $document_id; -} + return $document_id; + } } diff -u b/src/Form/LingotekContentTranslationForm.php b/src/Form/LingotekContentTranslationForm.php --- b/src/Form/LingotekContentTranslationForm.php +++ b/src/Form/LingotekContentTranslationForm.php @@ -145,7 +145,7 @@ && !empty($document_id) && (!isset($target_status) || $target_status === Lingotek::STATUS_UNTRACKED || $target_status === Lingotek::STATUS_EDITED || $target_status === Lingotek::STATUS_REQUEST) ) { - $path = '/admin/lingotek/entity/add_target/' . $document_id . '/' . $locale->getName(); + $path = '/admin/lingotek/entity/add_target/' . $document_id . '/' . $locale; $this->addOperationLink($entity, $option, 'Request translation', $path, $language); } elseif ($target_status === Lingotek::STATUS_PENDING) { diff -u b/src/FormComponent/LingotekFormComponentBulkActionExecutor.php b/src/FormComponent/LingotekFormComponentBulkActionExecutor.php --- b/src/FormComponent/LingotekFormComponentBulkActionExecutor.php +++ b/src/FormComponent/LingotekFormComponentBulkActionExecutor.php @@ -26,7 +26,7 @@ public function execute(LingotekFormComponentBulkActionInterface $action, array $entities, array $options, LingotekFormComponentBulkActionInterface $fallbackAction = NULL) { if ($action->isBatched() && $action->hasBatchBuilder()) { /** @var DownloadTranslations $action */ - return $action->createBatch($this, $entities, $options); + return $action->createBatch($this, $entities, $options, $fallbackAction); } elseif ($action->isBatched()) { return $this->createBatch($action, $entities, $options, $fallbackAction); diff -u b/src/LingotekConfigTranslationService.php b/src/LingotekConfigTranslationService.php --- b/src/LingotekConfigTranslationService.php +++ b/src/LingotekConfigTranslationService.php @@ -155,7 +155,7 @@ /** * {@inheritDoc} */ - public function getTranslatableProperties(TraversableTypedDataInterface $schema, $base_key=NULL): array { + public function getTranslatableProperties(TraversableTypedDataInterface $schema, $base_key = NULL): array { $properties = []; $definition = $schema->getDataDefinition(); if (isset($definition['form_element_class'])) { @@ -1249,7 +1249,7 @@ throw $exception; } if ($document_id) { -// $this->setConfigDocumentId($mapper, $document_id); + $this->setConfigDocumentId($mapper, $document_id); $this->setConfigSourceStatus($mapper, Lingotek::STATUS_IMPORTING); $this->setConfigTargetStatuses($mapper, Lingotek::STATUS_REQUEST); $this->setConfigJobId($mapper, $job_id); diff -u b/src/LingotekContentTranslationService.php b/src/LingotekContentTranslationService.php --- b/src/LingotekContentTranslationService.php +++ b/src/LingotekContentTranslationService.php @@ -558,8 +558,8 @@ public function getDocumentId(ContentEntityInterface &$entity) { $doc_id = NULL; $metadata = $entity->hasField('lingotek_metadata') ? $entity->lingotek_metadata->entity : NULL; - if ($metadata !== NULL && $metadata->get('document_id')) { - $doc_id = $metadata->get('document_id')->getString(); + if ($metadata !== NULL && $metadata->document_id) { + $doc_id = $metadata->document_id->value; } return $doc_id; } diff -u b/src/Moderation/LingotekModerationFactory.php b/src/Moderation/LingotekModerationFactory.php --- b/src/Moderation/LingotekModerationFactory.php +++ b/src/Moderation/LingotekModerationFactory.php @@ -71,6 +71,7 @@ foreach ($this->config as $service) { if ($service->applies()) { $result = $service; + break; } } return $result; @@ -84,6 +85,7 @@ foreach ($this->forms as $service) { if ($service->applies()) { $result = $service; + break; } } return $result; @@ -97,6 +99,7 @@ foreach ($this->handlers as $service) { if ($service->applies()) { $result = $service; + break; } } return $result; diff -u b/src/Plugin/LingotekFieldProcessor/LingotekCohesionLayoutProcessor.php b/src/Plugin/LingotekFieldProcessor/LingotekCohesionLayoutProcessor.php --- b/src/Plugin/LingotekFieldProcessor/LingotekCohesionLayoutProcessor.php +++ b/src/Plugin/LingotekFieldProcessor/LingotekCohesionLayoutProcessor.php @@ -244,7 +244,7 @@ * @throws \Drupal\Core\TypedData\Exception\MissingDataException */ public function store(ContentEntityInterface &$translation, string $langcode, ContentEntityInterface &$revision, string $field_name, FieldDefinitionInterface $field_definition, array &$field_data) { - $existingData = $revision->get($field_name)->get(0)->getValue(); + $existingData = $revision->get($field_name)->get(0)->value; $layout_canvas = new LayoutCanvas($existingData); foreach ($layout_canvas->iterateCanvas() as $element) { if (!$element->isComponent() || !$component = $this->entityTypeManager->getStorage('cohesion_component')->load($element->getComponentID())) {