Changes to parent terms are not reflected on content showing hierarchical terms until after a cache clear

Created on 2 July 2025, 11 days ago

Problem/Motivation

If a node references term 3 and somebody edits term 3 to change its name or capitalization or to correct a translation, the next person viewing that node sees the updated name for term 3, even though nobody has edited the node in the meantime, because Drupal's caching system invalidates the render cache and who knows what of the entity that references that term.

But if that node's content type display is configured to use CSHS and also shows terms 2 and 1, a parent and grandparent of term 3, and somebody corrects the name of term 1 or term 2, these will continue to be displayed incorrectly until something else invalidates the cache.

Steps to reproduce

Proposed resolution

It should be trivial to invalidate the node cache for changes to parent terms.

The trick is figuring out when to do it. Doing it for all nodes for all terms is probably not a good idea. But looking up display configuration on term save might… well actually that might not be so bad. If it is, then documenting the problem and possibly providing a helper or pointers to helpers to manually set which term references should trigger the referencing content to have its cache invalidated for changes to ancestor terms as well as the directly referenced term.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇺🇸United States mlncn Minneapolis, MN, USA

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

Comments & Activities

Production build 0.71.5 2024