From 74c4c0ab706bf2c1fb639365534e3aa9a5e2abd4 Mon Sep 17 00:00:00 2001 From: catch <6915-catch@users.noreply.drupalcode.org> Date: Thu, 23 Jan 2025 13:11:09 +0000 Subject: [PATCH] Issue #3367556 by vensires, danchadwick, detroz, g089h515r806, groendijk: SDC components CSS & JS generated wrong url in windows / XAMPP --- core/lib/Drupal/Core/Theme/ComponentPluginManager.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/lib/Drupal/Core/Theme/ComponentPluginManager.php b/core/lib/Drupal/Core/Theme/ComponentPluginManager.php index 00772ec738ca..0bb5d4c2b6ce 100644 --- a/core/lib/Drupal/Core/Theme/ComponentPluginManager.php +++ b/core/lib/Drupal/Core/Theme/ComponentPluginManager.php @@ -488,6 +488,8 @@ private function makePathRelativeToLibraryRoot(string $path): string { $path_from_root = str_starts_with($path, $this->appRoot) ? substr($path, strlen($this->appRoot) + 1) : $path; + // Make sure this works seamlessly in every OS. + $path_from_root = str_replace(DIRECTORY_SEPARATOR, '/', $path_from_root); // The library owner is in <root>/core, so we need to go one level up to // find the app root. return '../' . $path_from_root; -- GitLab