Using subrequests prevents some context being used

Created on 8 August 2025, about 1 month ago

I'm using view_mode_page for a display mode that shows views within layout builder. The views use a group id as a contextual filter. With view_mode_page rendering the content as a subrequest, the group context gets lost because the route parameters are just entity type, entity id and view mode.

I've prepared a patch that changes view_mode_page from using a subrequest to setting up routes for the aliases. The routes essentially clone the entity's canonical route, except for the view mode.

🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇦🇺Australia nigelcunningham Geelong

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

Comments & Activities

Production build 0.71.5 2024