From 17d94ed36194284774abf143c82587f576177715 Mon Sep 17 00:00:00 2001 From: Toni Sinisalo Date: Thu, 5 Feb 2026 10:49:21 +0200 Subject: [PATCH] UHF-X: Include cache tags from tpr_unit entity on unit contact card paragraph to allow proper cache purging. --- hdbt.theme | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hdbt.theme b/hdbt.theme index 0166f06b6..42e3cab6b 100644 --- a/hdbt.theme +++ b/hdbt.theme @@ -917,6 +917,12 @@ function hdbt_preprocess_paragraph__unit_contact_card(array &$variables) : void return; } + // Collect cache tags from tpr_unit entity. + $variables['#cache']['tags'] = Cache::mergeTags( + $unit->getCacheTags(), + $variables['#cache']['tags'] ?? [] + ); + $unit_translation = $unit->getTranslation($langcode); $variables['unit_contact_card'] = [];