URLs not updated when a cache dependency has changed

Created on 21 April 2023, almost 2 years ago
Updated 11 May 2023, almost 2 years ago

Problem/Motivation

This module allows to customize the API urls of the various social media at /admin/config/services/social-media, and expects these urls to be populated with tokens โ†’ .

However when using a token that depends on another object, and that object expires in cache, then the metadata does not bubble up to the render array and as a result the social media block is not updated (until you manually clear all caches from /admin/config/development/performance for instance).

Proposed resolution

Is it possible to pass a BubbleableMetadata object when performing the token replacement operation ? Attached is a patch that does this and fixes the problem for me.

It is also the recommended way to resolve this type of issue -- see documentation at
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Utility%2...

๐Ÿ› Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

๐Ÿ‡จ๐Ÿ‡ฆCanada fengtan Montreal, Canada

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

Comments & Activities

Production build 0.71.5 2024