0

When I try to go to the Structure > Webforms > Settings and Webforms I am getting the following error. I tried the $ drush webform-repair command, but that doesn't work. My Drupal version is 8.6.4.

The website encountered an unexpected error. Please try again later. TypeError: Argument 4 passed to Drupal\webform\EntitySettings\WebformEntitySettingsBaseForm::appendBehaviors() must be of the type array, null given, called in /Applications/MAMP/htdocs/ubci+webform/modules/webform/src/EntitySettings/WebformEntitySettingsGeneralForm.php on line 274 in Drupal\webform\EntitySettings\WebformEntitySettingsBaseForm->appendBehaviors() (line 104 of modules/webform/src/EntitySettings/WebformEntitySettingsBaseForm.php).

And I am getting another error when I try to download the results on Webforms > Download.

The website encountered an unexpected error. Please try again later. Error: Unsupported operand types in Drupal\webform\Form\WebformResultsExportForm->buildForm() (line 57 of modules/webform/src/Form/WebformResultsExportForm.php). Drupal\webform\Form\WebformResultsExportForm->buildForm(Array, Object, Object)

1
  • In case you have not tried it: Goto Configuration/Development/Performance and clear the cache. Also since you are using Webform... be sure to use composer and see if the Webform and it's requirements are up to date.
    – DStrider
    Sep 24, 2019 at 19:31

2 Answers 2

1

I found the solution on the maintainer's blog: https://www.jrockowitz.com/blog/managing-webform-configuration. Go to admin/structure/webform/config/advanced and click 'Repair configuration'.

Repairing admin configuration and webform settings

If you happen upon some webform configuration that is outdated, you can run the drush webform:repair command or click the 'Repair configuration' via the admin UI under that 'Advanced' configuration tab (admin/structure/webform/config/advanced)

0
0

In my case, I was working on a migrated site and didn't have the webform.settings config.

To fix:

  1. Grab config from an existing site: /admin/config/development/configuration/single/export
  2. Import the config to current site: /admin/config/development/configuration/single/import

I had some errors about themes not being present, so I had to create dummy themes, install them, then uninstall them before the config import would work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.