Still trying to translate my webforms in other languages.

When browsing my webform in another language, I have a WSOD with this error in drupal logs:
Error: Unsupported operand types in Drupal\webform\Entity\Webform->getSettings() (line 629 of C:\laragon\www\dev.alarm\web\modules\contrib\webform\src\Entity\Webform.php)

I'm using PHP 7.

Issue fork webform-2880392

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

heyyo created an issue. See original summary.

heyyo’s picture

Status: Active » Needs review
FileSize
590 bytes

Temporary fix, which removes the error.

jrockowitz’s picture

Status: Needs review » Fixed

Thanks for the patch.

  • jrockowitz committed a7c8205 on 8.x-5.x authored by heyyo
    Issue #2880392 by heyyo: Error: Unsupported operand types webform in...

Status: Fixed » Closed (fixed)

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

heyyo’s picture

I experienced the similar issue on one of my translated webform, I supposed it's caused by not having any config settings for this webform in the translated language folder.

Error : Unsupported operand types dans Drupal\webform\Entity\Webform->setSettings() (/home/XXXX/XXXX/web/modules/contrib/webform/src/Entity/Webform.php ligne 705) #0

Please find another patch for the method setSettings of the webform class, which resolves my issue.

JeroenT’s picture

Title: Error: Unsupported operand types webform in another language » Error: Unsupported operand types in Drupal\webform\Entity\Webform->setSettings() (line 739

@heyyo,

I'm having the same problem. I created a follow-up issue for it: #2958792: Error: Unsupported operand types in Drupal\webform\Entity\Webform->setSettings() (line 739

Jaypan’s picture

The patch from #6 works for me

poonlap’s picture

After upgraded to latest version. I had the same problem. The patch #6 solved the problem. Thank you.

weseze’s picture

Can this please be reopened?

Just updated to RC16 and running into this problem again...

Now on line 760 and the patch from #6 does not seem applied anymore?

jrockowitz’s picture

This patch is suppressing a much larger issue that your webform settings are being lost/deleted during the update.

I think this issue is related to #2913548: Source element values are replaced with translated values.

golubovicm’s picture

Just to confirm that patch is still needed but at least still working with RC18 and RC19.

ankondrat4 made their first commit to this issue’s fork.