TypeError: Symfony\Component\HttpFoundation\InputBag::get(): Argument #1 ($key) must be of type string, null given, called in /var/www/html/docroot/core/lib/Drupal/Core/Routing/RouteMatch.php on line 127 in Symfony\Component\HttpFoundation\InputBag->get()

Created on 2 November 2023, 10 months ago
Updated 31 January 2024, 7 months ago
πŸ› Bug report
Status

Postponed: needs info

Version

10.1 ✨

Component
FieldΒ  β†’

Last updated 1 day ago

Created by

πŸ‡¨πŸ‡³China jessey

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

Comments & Activities

  • Issue created by @jessey
  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    What did you do to trigger this error message? This feels like an incomplete routing definition somewhere.

  • Status changed to Postponed: needs info 10 months ago
  • πŸ‡ΊπŸ‡ΈUnited States cilefen
  • πŸ‡¦πŸ‡ΊAustralia gigimaor Gold Coast/Brisbane

    In my case, after updating the core version to 10.2.2
    In /admin/config/people/accounts

    TypeError: Symfony\Component\HttpFoundation\InputBag::get(): Argument #1 ($key) must be of type string, null given, called in /code/web/core/lib/Drupal/Core/Routing/RouteMatch.php on line 127 in Symfony\Component\HttpFoundation\InputBag->get() (line 29 of /code/vendor/symfony/http-foundation/InputBag.php).
    Drupal\Core\Routing\RouteMatch->getRawParameter() (Line: 61)
    Drupal\workflow_field_groups\Access\WorkflowFieldGroupsAccessCheck->access()
    call_user_func_array() (Line: 160)
    Drupal\Core\Access\AccessManager->performCheck() (Line: 136)
    Drupal\Core\Access\AccessManager->check() (Line: 93)
    ...
    

    In my case, it is caused by a module that is not supported anymore but is still in use: workflow_field_groups

    On this line web/core/lib/Drupal/Core/Routing/RouteMatch.php on line 127 $parameter_name is NULL

      public function getParameter($parameter_name) {
        return $this->parameters->get($parameter_name);
      }
    

    Preventing this from happening could be done by patching this line
    return $this->parameters->get($parameter_name);
    to this
    return $this->parameters->get($parameter_name ?? '');

  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    The fix should be made in workflow_field_groups, why is it calling getParameter(NULL)?

Production build 0.71.5 2024