dmitryd / dd_deepl

3 stars 9 forks source link

Translation process stops, when source is not main language #44

Open mclewing opened 1 week ago

mclewing commented 1 week ago

Translation throws exception and aborts when you try to do this:

1.) translate a content-element with fal-relation from main language 0 to child language 1 2.) exchange image in the new element in language 1: remove image and add another image (so still ONE image, but simply another one) 3.) translate element to language 2 using language 1 as source.

Results in exception below, process stops. Child records (images) sometimes (!) get attached to element in language 1.

+0200 [CRITICAL] request="41ece80ee6660" component="TYPO3.CMS.Core.Error.DebugExceptionHandler": Core: Exception handler (WEB: BE): TypeError, code #0, file /var/www/html/vendor/dmitryd/dd-deepl/Classes/Service/DeeplTranslationService.php, line 275: Dmitryd\DdDeepl\Service\DeeplTranslationService::translateRecord(): Argument #2 ($record) must be of type array, null given, called in /var/www/html/vendor/dmitryd/dd-deepl/Classes/Hook/DataHandlerTranslationHook.php on line 86

'Normal' translations without deepl work fine.

TYPO3 12.4.21

mclewing commented 1 week ago

some more research: this happens when tca setting allowlanguagesynchronization is set to true

https://docs.typo3.org/m/typo3/reference-tca/main/en-us/ColumnsConfig/Type/Text/T3Editor/Index.html#confval-text-t3editor-behaviour-allowlanguagesynchronization