Problem/Motivation
This is a follow-up issue of #3212867: Unable to translate webforms 6.0.3.
When there is a webform with no elements and it is created a translation for it, it triggers the error bellow.
TypeError: Argument 1 passed to Drupal\webform\WebformTranslationConfigManager::mergeTranslationAndSourceElementsProperties() must be of the type array, null given, called in /app/modules/contrib/webform/src/WebformTranslationConfigManager.php on line 298
Steps to reproduce
1) Install language and configuration translation.
2) Add a second language to your site.
3) Create a new webform but add no element to it.
4) Add a new translation to the webform and save it.
5) See the error.

| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 3213178-8.patch | 968 bytes | jrockowitz |
| #5 | Screenshot from 2021-05-11 13-45-56.png | 32.39 KB | marcusvsouza |
| #2 | 3213178-2.patch | 968 bytes | paulocs |
| #2 | webform.webform.3213178.yml | 4.56 KB | paulocs |
Comments
Comment #2
paulocsAttaching a webform to reproduce the error and a patch.
Notice: it should be applied patch #3 of #3212867: Unable to translate webforms 6.0.3 to test it.
Cheers, Paulo.
Comment #3
jrockowitz commentedComment #4
paulocsThanks. I was changing the version now.
Comment #5
marcusvsouza commentedTested, the patch worked as expected!
Comment #6
joseph.olstadpatch has 519 fails on D9.1 ?
Comment #7
paulocsComment #8
jrockowitz commentedComment #10
jrockowitz commentedComment #11
jrockowitz commented