From b0658963dc732c2ea1e42908ab4a2b72d9b21a59 Mon Sep 17 00:00:00 2001 From: Bhupesh Pandey Date: Mon, 13 Jan 2025 21:09:37 +0530 Subject: [PATCH 1/2] fixed: neo block draft issue --- src/services/fieldtranslator/NeoFieldTranslator.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/services/fieldtranslator/NeoFieldTranslator.php b/src/services/fieldtranslator/NeoFieldTranslator.php index ed61ac6b..fcb373ff 100644 --- a/src/services/fieldtranslator/NeoFieldTranslator.php +++ b/src/services/fieldtranslator/NeoFieldTranslator.php @@ -102,7 +102,7 @@ public function toPostArrayFromTranslationTarget(ElementTranslator $elementTrans $i = 'new' . ++$new; $isTranslatable = $field->getIsTranslatable($element); - $blockId = $isTranslatable ? $i : $this->getBlockUid($block); + $blockId = $isTranslatable ? $i : $block->id; $blockData = $allBlockData[$i] ?? array(); $data = array( @@ -163,7 +163,7 @@ public function toPostArray(ElementTranslator $elementTranslator, Element $eleme foreach ($blocks as $i => $block) { $isTranslatable = $field->getIsTranslatable($element); - $blockId = $isTranslatable ? $i : $this->getBlockUid($block); + $blockId = $isTranslatable ? $i : $block->id; $data = array( 'modified' => '1', @@ -183,9 +183,4 @@ public function toPostArray(ElementTranslator $elementTranslator, Element $eleme return $post; } - - private function getBlockUid($block) - { - return sprintf('uid:%s', $block->getCanonicalUid()); - } } From 9c4435fadea9a5b6882676aa4f09e250c8c3adba Mon Sep 17 00:00:00 2001 From: Sid Edwards Date: Mon, 13 Jan 2025 10:52:27 -0700 Subject: [PATCH 2/2] Update plugin version to 3.4.3, fix Neo block propagation issue for non-localized blocks --- .craftplugin | 2 +- CHANGELOG.md | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.craftplugin b/.craftplugin index 31e4a1c2..2a9c524c 100644 --- a/.craftplugin +++ b/.craftplugin @@ -1,7 +1,7 @@ { "pluginName": "Translations for Craft", "pluginDescription": "Drive global growth with simplified translation workflows.", - "pluginVersion": "3.4.2", + "pluginVersion": "3.4.3", "pluginAuthorName": "Acclaro", "pluginVendorName": "Acclaro", "pluginAuthorUrl": "http://www.acclaro.com/", diff --git a/CHANGELOG.md b/CHANGELOG.md index 0762b5fd..85a0c0bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## 3.4.3- 2025-01-13 + +### Fixed + +- An issue with Neo block propagation for non-localized blocks. ([AcclaroInc#562](https://github.com/AcclaroInc/pm-craft-translations/issues/562)) + ## 3.4.2 - 2024-12-16 ### Fixed