diff --git a/CHANGELOG.md b/CHANGELOG.md index 77e3a7e2..70fd358a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# v1.10.13 +## mm/dd/2021 + +1. [](#bugfix) + * Moved preset CSS compile to earlier in the process to ensure compilation happens in time. + # v1.10.12 ## 04/15/2021 diff --git a/admin.php b/admin.php index e58f3a23..e2ad4332 100644 --- a/admin.php +++ b/admin.php @@ -578,13 +578,6 @@ class AdminPlugin extends Plugin $assets->setJsPipeline(false); $assets->setCssPipeline(false); - // Compile a missing preset.css file - $preset_css = 'asset://admin-preset.css'; - $preset_path = $this->grav['locator']->findResource($preset_css); - if (!$preset_path) { - $this->grav['admin-whitelabel']->compilePresetScss($this->config->get('plugins.admin.whitelabel')); - } - } /** @@ -600,6 +593,7 @@ class AdminPlugin extends Plugin $twig_paths[] = __DIR__ . '/themes/' . $this->theme . '/templates'; $this->grav['twig']->twig_paths = $twig_paths; + } /** @@ -1116,6 +1110,13 @@ class AdminPlugin extends Plugin // Initialize white label functionality $this->grav['admin-whitelabel'] = new WhiteLabel(); + // Compile a missing preset.css file + $preset_css = 'asset://admin-preset.css'; + $preset_path = $this->grav['locator']->findResource($preset_css); + if (!$preset_path) { + $this->grav['admin-whitelabel']->compilePresetScss($this->config->get('plugins.admin.whitelabel')); + } + // These events are needed for login. $this->enable([ 'onTwigExtensions' => ['onTwigExtensions', 1000],