API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21...
The Render API overview Caching section code example specifies a "language" (singular) cache context, but it should be "languages" (plural). Otherwise:
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "cache_context.language". Did you mean one of these: "cache_contexts_manager", "cache_context.route", "cache_context.languages", "cache_context.theme", "cache_context.user", "cache_context.url.path", "cache_context.url", "cache_context.url.site", "cache_context.timezone"? in Drupal\Component\DependencyInjection\Container->get() (line 161 of core/lib/Drupal/Component/DependencyInjection/Container.php).
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | render_api_caching-2634986-2.patch | 495 bytes | traviscarden |
Comments
Comment #2
traviscarden commentedComment #3
jhodgdonThanks! Seems right...
Comment #4
catchCommitted/pushed to 8.1.x and cherry-picked to 8.0.x. Thanks!
Comment #7
wim leersThanks! Good catch :)