Node RSS Views plugin causes wrong entity_view output to be cached

Created on 10 June 2017, about 7 years ago
Updated 13 February 2024, 4 months ago

Problem/Motivation

When a Feed display is configured for a view the node RSS row plugin removes the #theme attribute from the built node data, causing the displayed nodes to render their fields individually instead of via the node template. However, the render element still contains the same caching information, causing it to be stored in the render cache as the output for that node & view mode (with a permanent max-age). Any other location where the node is displayed with that same view type will load the cached, incorrect, output.

Steps to Reproduce

1. Create a view with two displays; one Page display and one Feed display.
2. Configure both displays to show nodes using the same view mode
3. Ensure render caching is enabled
4. Rebuild site caches
5. Open incognito(private) browser window
6. Visit the Feed display
7. Visit the Page display

The page display outputs the nodes as concatenated field markup instead of using the node template.

7. Rebuild site caches
8. Load the Page display
9. Load the Feed display
The page display should now use the node template markup.

Proposed resolution

When Views renders an entity display for use in an RSS feed, it should set a cache key to differentiate the RSS-rendered version, so that the RSS-rendered version isn't incorrectly used in other contexts (such as when rendering the same entity display for an HTML page).

πŸ› Bug report
Status

Fixed

Version

10.2 ✨

Component
Node systemΒ  β†’

Last updated about 2 hours ago

No maintainer
Created by

πŸ‡¨πŸ‡¦Canada gapple

Live updates comments and jobs are added and updated live.
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.69.0 2024