- Issue created by @andriic
- Merge request !37Issue #3515627: fix typeerror on request translation β (Merged) created by andriic
- π©πͺGermany SteffenR Germany
Thanks for the finding. We never run into those issues on our projects.
I would suggest du check beforehand, if$results['translation']
is really and array and is not empty. Otherwise, we would add empty translateData to the job_item, which is not neccessary. - πΊπ¦Ukraine andriic
hi @steffenr,
If we will not add translatedData to the job it will stay in "In progress" state forever, which is not correct since there's nothing to translate and job could be reviewed.
It could confuse users and push them to delete and re-add job again and again. - π©πͺGermany SteffenR Germany
@andriic: Okay - than your suggestion makes sense.
Can you give me some more information on how to reproduce the issue?
You are writing about "Custom fields" which don't return arrays - can you give some examples?Thx.
- πΊπ¦Ukraine andriic
in our case we're using https://www.drupal.org/project/tablefield β as a translatable field.
- π©πͺGermany SteffenR Germany
@andriic: I've extended an existing content type with a tablefield (using latest stable 3.x release of the module) and tmgmt_deepl 2.2.9.
Unfortunately i cannot reproduce the issue - translations are working fine - also for translatable tablefield fields.
While translating table field content is not shown while reviewing the translation within the job. The only field which is translatable in this case is the caption field. - πΊπ¦Ukraine andriic
hi @steffner!
I've discovered what cause that issue on our side. We're using additional hook_tmgmt_job_before_request_translation() to request translations only for selected fields. And when only tablefield selected the error occurs.
By default when requesting translation we send all fields to the translator and there's a very rare situation could happen when only tablefield in the Node will be translatable to make this error happen. -
andriic β
committed 4d68b6a9 on 2.2.x
Issue #3515627: fix typeerror on request translation
-
andriic β
committed 4d68b6a9 on 2.2.x