Cached relation IDs are broken

Created on 4 April 2025, 20 days ago

The hal module permanently caches relation IDs.
If that cache gets build via LinkManager::getRelationInternalIds(), broken data could be cached.

The problem is that LinkManager::getRelationInternalIds() doesn't forward the context to RelationLinkManager::getRelationInternalIds().

This breaks two functionalities:

  1. hook_hal_relation_uri_alter() gets an empty context which might lead to different results
  2. A CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY context gets lost. So, LinkManagerBase::getLinkDomain() can not add the configs hal.settings or url.site. This causes illegal values returned by cache later if these configs change

This is an critical issue because it leads to broken JSON files. Or in case of the default_content_deploy module, the denormalization of references fails.

๐Ÿ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

๐Ÿ‡ฉ๐Ÿ‡ชGermany mkalkbrenner ๐Ÿ‡ฉ๐Ÿ‡ช

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024