The `global` `AssetLibrary` should not be loaded on all pages β€” only on routes where the negotiated theme is the default theme

Created on 23 July 2025, 3 days ago

Overview

\Drupal\experience_builder\Hook\ComponentSourceHooks::pageAttachments() is too eager: it blindly does

$page['#attached']['library'][] = AssetLibrary::load(AssetLibrary::GLOBAL_ID)->getAssetLibrary($is_preview);

Proposed resolution

Load it only when the negotiated/active theme is the currently configured default theme.

User interface changes

None β€” other than global CSS no longer loading when it shouldn't.

πŸ› Bug report
Status

Active

Version

1.0

Component

Component sources

Created by

πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

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