Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
I'm are seeing a lot of PHP warnings when visiting the edit form page:
2021/12/21 21:31:27 [error] 1935#1935: *17323 FastCGI sent in stderr: "PHP message: TypeError: Argument 1 passed to Symfony\Component\Yaml\Parser::parse() must be of the type string, null given, called in /var/www/html/web/core/lib/Drupal/Component/Serialization/YamlSymfony.php on line 37 in /var/www/html/vendor/symfony/yaml/Parser.php on line 80 #0 /var/www/html/web/core/lib/Drupal/Component/Serialization/YamlSymfony.php(37): Symfony\Component\Yaml\Parser->parse(NULL, 2)
#1 /var/www/html/web/core/lib/Drupal/Component/Serialization/Yaml.php(35): Drupal\Component\Serialization\YamlSymfony::decode(NULL)
#2 /var/www/html/web/modules/contrib/webform/modules/webform_ui/src/WebformUiEntityElementsForm.php(220): Drupal\Component\Serialization\Yaml::decode(NULL)
#3 [internal function]: Drupal\webform_ui\WebformUiEntityElementsForm->validateForm(Array, Object(Drupal\Core\Form\FormState))
#4 /var/www/html/web/core/lib/Drupal/Core/Form/FormValidator.php(82): call_user_func_array(Array, Array)
#5 /var/www/html/web/core/lib/Drupal/Core/Form/FormValidator.php(275): Drupal\Core\For" while reading response header from upstream, client: 172.18.0.7, server: , request: "POST /admin/structure/webform/manage/my_webform?ajax_form=1&_wrapper_format=drupal_ajax HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm.sock:", host: "site.ddev.site:4243", referrer: "https://site.ddev.site:4243/admin/structure/webform/manage/my_webform"
Checking how many logs we have, it returns a really big number, for just a few minutes of execution:
ddev logs | grep "WebformUiEntityElementsForm.php(220)" | wc -l
16550
Steps to reproduce
I don't have a simple case to replicate this issue, just posting this to provide a patch.
Proposed resolution
See patch attached.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#2 | webform-3255524-2.patch | 1.41 KB | dagmar |
Comments
Comment #2
dagmarComment #5
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedThanks for the patch.