Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
If you enable caching for the front page view and access the site RSS /rss.xml you get an error page and the following error is logged:
Recoverable fatal error: Argument 1 passed to Drupal\Core\Render\Element::children() must be of the type array, string given, called in core/includes/common.inc on line 3842 and defined in Drupal\Core\Render\Element::children() (line 71 of core/lib/Drupal/Core/Render/Element.php).
Proposed resolution
Let the RSS style plugin return a render array.
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#1 | 2276579-test_only.patch | 1.77 KB | olli |
#1 | 2276579-1.patch | 2.97 KB | olli |
Comments
Comment #1
olli CreditAttribution: olli commentedComment #4
dawehner1: 2276579-1.patch queued for re-testing.
Comment #5
olli CreditAttribution: olli commentedWith this patch it won't cache the rendered output but the render array which is bad for performance. #2158167: Views output cache is verbose looks related.
Comment #16
quietone CreditAttribution: quietone at PreviousNext commented@olli, Thank you for reporting this problem. We rely on issue reports like this to improve Drupal core.
I tested this on 9.4.x and was not able to reproduce this error. I tested with all three options for the caching and didn't get an error.
Therefore, closing as cannot reproduce. If you are experiencing this problem on a supported version of Drupal reopen the issue, by setting the status to 'Active', and provide complete steps to reproduce the issue (starting from "Install Drupal core").
Thanks!