BadRequestHttpException: No contextual ID tokens specified

Created on 20 October 2018, over 6 years ago
Updated 1 April 2025, 7 days ago

Received two identical errors of type php upon updating to the latest 8.6.2 from 8.6.1

Symfony\Component\HttpKernel\Exception\BadRequestHttpException: No contextual ID tokens specified. in Drupal\contextual\ContextualController->render() (line 70 /home/....../public_html/core/modules/contextual/src/ContextualController.php).

Is this any serious? and how do I resolve it?
Thanks for your help!

πŸ› Bug report
Status

Closed: cannot reproduce

Version

9.3

Component

contextual.module

Created by

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States brad.bulger

    I believe that in most of the cases where this error shows up in my logs, the client has made a GET request to /contextual/render. It looks like bots that are monitoring all the URLs accessed by a page request and trying to hit all of them. So they make a normal request to some page on the site, which triggers an ajax event that does a POST to /contextual/render, and somehow they see that URL and try to follow it.

    I think it would be preferable to just silently fail in that case, versus the BadRequestHttpException. I certainly get a ton of these errors and they're effectively meaningless.

Production build 0.71.5 2024