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.

Comments

paulocs created an issue. See original summary.

paulocs’s picture

Status: Active » Needs review
StatusFileSize
new4.56 KB
new968 bytes

Attaching 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.

jrockowitz’s picture

Version: 8.x-5.x-dev » 6.x-dev
paulocs’s picture

Thanks. I was changing the version now.

marcusvsouza’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new32.39 KB

Tested, the patch worked as expected!

joseph.olstad’s picture

patch has 519 fails on D9.1 ?

paulocs’s picture

Status: Reviewed & tested by the community » Needs work
jrockowitz’s picture

Status: Needs work » Needs review
StatusFileSize
new968 bytes

Status: Needs review » Needs work

The last submitted patch, 8: 3213178-8.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

jrockowitz’s picture

Status: Needs work » Needs review
jrockowitz’s picture

Status: Needs review » Fixed

  • jrockowitz authored ff39a34 on 6.x
    Issue #3213178 by paulocs, jrockowitz, marcusvsouza: Unable to translate...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.