jsonapi webform/webform return 500 status code

Created on 24 March 2025, 15 days ago

Problem/Motivation

I was using jsonapi/webform/webform to pull all webform instances for my gatsby project
It was working properly before drupal/core < 10.3.x, once I upgraded to 10.3.x or 10.4.x. I encountered following issue when I call the endpoint after I applied most recent drupal security upgrade https://www.drupal.org/sa-core-2025-004:
"title": "Internal Server Error",
"status": "500",
"detail": "Symfony\\Component\\Yaml\\Parser::parse(): Argument #1 ($value) must be of type string, null given, called in /code/web/core/lib/Drupal/Component/Serialization/Yaml.php on line 37",

Steps to reproduce

apply most recent drupal core security upgral
call the /jsonapi/webform/webform endpoint

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

6.2

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jhuang25
  • What is the specific Drupal core version that introduces this bug? I can't determine that from the way this issue is worded, but the wording indicates you may have this information.

  • I was experimenting with Drupal/Core upgrade to determine when this happened.
    When I have core upgraded to 10.2.3 to 10.2.6, 10.2.7, it was still working ok.
    I havent' got the chance to go through other 10.2.x version.
    I was kinda in rush to apply the security update, then I upgraded directly to 10.3.14, /jsonapi/webform/webform stopped working.
    Then I created another instance just to rule out my bias, upgraded to 10.4.5, the endpoint was not working either. I didnt encounter any issues in other endpoints.
    I tried to refer to previous patching:
    1. https://www.drupal.org/project/webform/issues/3283914 --it has been included in the repo already.
    please let me know if any other information I can provide.
    Thanks

  • 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦

    Does the problem appear in the latest development version of 6.3.x?

  • I tried 6.3.0-beta2, the issue showed up, haven't tried alph3 tho. will try and update the ticket.

  • 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦

    It is best to test with the tip of the 6.3.x branch. You can check that out from Git or download the development version.

  • I just tested with dev branch (dev-6.3.x e4a28a7), I was able to re-produce the issue.
    errors": [
    {
    "title": "Internal Server Error",
    "status": "500",
    "detail": "Symfony\\Component\\Yaml\\Parser::parse(): Argument #1 ($value) must be of type string, null given, called in /code/web/core/lib/Drupal/Component/Serialization/Yaml.php on line 37",
    "links": {
    "via": {
    "href": "-------/jsonapi/webform/webform"
    },
    "info": {
    "href": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1"
    }
    }
    }
    ]

  • I can't reproduce this bug. I tested with Drupal 10.2.7, 10.4.0, 10.4.1, 10.4.2, 10.4.3, and 10.4.4.

    We need additional steps to reproduce the bug. Are other entity endpoints working on the affected site? Can you get a stack trace?

  • I have done extra testing, I was able to read stack trace that the issue was generated from another plugin, I removed that and the endpoint resume working. Sorry for the false alarm and thanks very much for your help.

Production build 0.71.5 2024