During a D7-to-D8 webform migration (which is almost out-of-the-box, thanks to webform_migrate module!), I ran into several error when accessing my webform settings form for the first time. Some default where not set by the migration.

Error example : Notice: Undefined index: page_submit_path in Drupal\webform\Entity\Webform->updatePaths() (line 2385 of modules/contrib/webform/src/Entity/Webform.php).

While I'll fix my own migration tohave better defaults, I guess the Webform Entity Class may prevent accessing undefined index by using the (already existing) helper getSetting() instead of accessing the settings array. I'll attach a patch in the next comment.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

opi created an issue. See original summary.

opi’s picture

Status: Active » Needs review
FileSize
1.52 KB
jrockowitz’s picture

Version: 6.x-dev » 8.x-5.x-dev

We should backport this patch to 8.x-5.x.

jrockowitz’s picture

opi’s picture

> We should backport this patch to 8.x-5.x.

Oh sorry about that, and thanks for the patch!

  • jrockowitz authored e3f1b07 on 8.x-5.x
    Issue #3194629 by opi, jrockowitz: Use this->getSetting() instead of...

  • jrockowitz authored e3f1b07 on 6.x
    Issue #3194629 by opi, jrockowitz: Use this->getSetting() instead of...
jrockowitz’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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