PlaceholderGenerator does not accept array callbacks

Created on 5 June 2018, over 6 years ago
Updated 18 February 2023, almost 2 years ago

In Drupal\Core\Render\PlaceholderGenerator::createPlaceholder() we assume that callback passed to #lazy_builder is a string. This is not always a case and in Drupal\Core\Render\Renderer::doRender() we actually allow anything that's callable, ie. strings, arrays, etc.

So now we should either allow arrays in Drupal\Core\Render\PlaceholderGenerator::createPlaceholder() or make Drupal\Core\Render\Renderer::doRender() that it only accepts strings. The latter one can be not easy to achive without breaking BC.

πŸ› Bug report
Status

Needs work

Version

10.1 ✨

Component
RenderΒ  β†’

Last updated about 8 hours ago

Created by

πŸ‡³πŸ‡΄Norway zaporylie

Live updates comments and jobs are added and updated live.
  • DrupalWTF

    Worse Than Failure. Approximates the unpleasant remark made by Drupal developers when they first encounter a particular (mis)feature.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

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 smustgrave

    This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request β†’ as a guide.

    Can the issue summary be updated please proposed solution. Think it's there but not super clear.

Production build 0.71.5 2024