Problem/Motivation

When rendering a render array, we recursively call doRender on the renderer.
However there is only a single try/catch at the root render call (in ::render) so a child render element failure can cause the whole render array to output nothing.

Steps to reproduce

Proposed resolution

Add support for #fallback or similar to render arrays
Wrap the recursive ::doRender calls in the renderer in try catch and render the fallback in case of a failure.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Comments

larowlan created an issue. See original summary.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.