Skip to content

issue 3443822: fix for 'No route found for the specified format html. Supported formats: json, xml.'

Mykola Dolynskyi requested to merge issue/drupal-3443822:10.3.x into 10.3.x

fix for 'No route found for the specified format html. Supported formats: json, xml.', see for details https://www.drupal.org/project/drupal/issues/3443822

I originally found this issue in 9.5, however, according Drupal\domain_entity\HttpKernel\DomainEntitySourcePathProcessor and Drupal\Core\Routing\Router source codes, the bug still should be present in 10.3.x.

I made fix for 9.5, but @cilefen said that this branch is EOL and I have to include in 10.3.x.

Long story in short: DomainEntitySourcePathProcessor invokes Url::fromUserInput() which further runs multiple Symfony Request create to check if path is valid, but info about url/route is passed through stack as string without any params, and _format is lost which triggers exception and breaks REST.

Please review and accept. Thanks.

Merge request reports

Loading