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).

CommentFileSizeAuthor
#2 render_api_caching-2634986-2.patch495 bytestraviscarden

Comments

TravisCarden created an issue. See original summary.

traviscarden’s picture

Assigned: traviscarden » Unassigned
Issue summary: View changes
Status: Active » Needs review
Issue tags: -Novice
StatusFileSize
new495 bytes
jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Thanks! Seems right...

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.1.x and cherry-picked to 8.0.x. Thanks!

  • catch committed da77deb on 8.1.x
    Issue #2634986 by TravisCarden: Render API caching section refers to non...

  • catch committed fd4ebbe on
    Issue #2634986 by TravisCarden: Render API caching section refers to non...
wim leers’s picture

Thanks! Good catch :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.