Replace renderRoot() with renderPlain() when trying to render a notifiication in an email.

Created on 13 December 2023, 7 months ago
Updated 5 January 2024, 6 months ago

Problem/Motivation

The renderRoot() should be used as a response to a controller. If we use the renderRoot or render() methods incorrectly it can produce warnings such as:

LogicException: Render context is empty, because render() was called outside of a renderRoot() 

We are catching a lot of this kind of logs warnings and its related to when cron processes a queue job.

Steps to reproduce

It's hard to reproduce this one, but you can try by creating a lot of notifications for a certain user that has the frequency set to 'Immediate', then running cron multiple times to process these jobs... the warning should appear in the watchdog.

Proposed resolution

Replace renderRoot with renderPlain

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

12.0

Component

Code (back-end)

Created by

🇸🇮Slovenia nkoporec Slovenia

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

Comments & Activities

Production build 0.69.0 2024