Cache context also requires URL

Created on 26 September 2020, over 4 years ago
Updated 7 November 2023, about 1 year ago

The cache context set in BackgroundImageBlock and BackgroundImageTextBlock is set to user permissions only, but you also needs to add the url, otherwise those blocks won't be rendered on individual pages.

We've seen this on one of our sites where we have no global background image but only on two individual entities. We also use big pipe module and that led to scenarios after a cache refresh, if anonymous user visited a node without a background image first, the block got cached not containing any content and that same block got considered when visiting a node with a background image afterwards. Hence, no markup in the html for it.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇩🇪Germany jurgenhaas Gottmadingen

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

  • 🇦🇺Australia nigelcunningham Geelong

    It's better to use the cache tags for the entities that make the cache invalid, together with contexts in which the image might vary (language etc). I'll prepare a version that does that.

  • Status changed to Fixed about 1 year ago
  • 🇦🇺Australia nigelcunningham Geelong

    I've made other changes in the area of caching and am seeing changes to background image settings take effect without requiring a cache clear. I'll mark this as fixed but please reopen if you retest and find any issues still exist.

    Thanks!

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024