Using renderRoot throws LogicException

Created on 1 February 2022, about 3 years ago
Updated 10 November 2023, over 1 year ago

Problem/Motivation

There is an issue with using renderRoot in hook_help function, it throws following exception:
LogicException: A stray renderRoot() invocation is causing bubbling of attached assets to break.

Steps to reproduce

1. Enable help block on admin pages
2. Open existing feed and go to mapping page
3. Blank page with fatal error is shown.

Proposed resolution

Rename renderRoot() method to render(). Not sure why renderRoot was used at all.

Remaining tasks

1. Needs review and testing if there are any side effects.
2. Need to be checked if render is needed in ajax callbacks - Drupal renders render arrays before sending data back.
3. Didn't change renderRoot calls inside tests

🐛 Bug report
Status

Needs work

Component

Code

Created by

🇪🇪Estonia rang501 Viljandi

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024