diff --git a/libraries/src/WebAsset/WebAssetRegistry.php b/libraries/src/WebAsset/WebAssetRegistry.php index 7f74b11db8330..1b4e02b05100b 100644 --- a/libraries/src/WebAsset/WebAssetRegistry.php +++ b/libraries/src/WebAsset/WebAssetRegistry.php @@ -304,7 +304,8 @@ public function addTemplateRegistryFile(string $template, int $client): self $this->addRegistryFile('templates/' . $template . '/joomla.asset.json'); break; case 1: - $this->addRegistryFile('administrator/templates/' . $template . '/joomla.asset.json'); + // Use basename() for cases when the administrator folder were redefined + $this->addRegistryFile(basename(JPATH_ADMINISTRATOR) . '/templates/' . $template . '/joomla.asset.json'); break; default: break;