From 756093a0bd4a9c14228e291aec97ed54d7f3677c Mon Sep 17 00:00:00 2001 From: Artur Kyryliuk Date: Sat, 29 Aug 2026 21:00:13 +0200 Subject: [PATCH] fix(install): write manager_theme and site_id on a CLI install The web installer writes both at installLevel 4 (install/src/controllers/install.php), and cli-install.php never reached that code: its whole install is realInstall() -> migrationAndSeed(), which inserts four settings and stops. Without manager_theme the manager builds its stylesheet URL as 'media/style/' . $config['manager_theme'] . '/style.css', which becomes media/style//style.css, 404s, and leaves the manager with no CSS at all - so every site installed from the command line, and every image built that way, looks broken before anything else is tried. Only the install path is touched; an existing site installed by the old CLI still has neither row. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01MXdDGZnGP6vGt9zTDG5o3n --- install/cli-install.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/install/cli-install.php b/install/cli-install.php index 335a50634a..4bd63c2294 100644 --- a/install/cli-install.php +++ b/install/cli-install.php @@ -598,6 +598,13 @@ public function migrationAndSeed() $systemSettings[] = ['setting_name' => 'auto_template_logic', 'setting_value' => 1]; $systemSettings[] = ['setting_name' => 'emailsender', 'setting_value' => $this->cmsAdminEmail]; $systemSettings[] = ['setting_name' => 'fe_editor_lang', 'setting_value' => $this->language]; + // The web installer writes these two at installLevel 4 + // (install/src/controllers/install.php); this path never reached them, + // so a CLI-installed site had no manager_theme and the manager built + // its stylesheet URL as media/style//style.css - a 404, leaving the + // whole manager unstyled. + $systemSettings[] = ['setting_name' => 'manager_theme', 'setting_value' => 'default']; + $systemSettings[] = ['setting_name' => 'site_id', 'setting_value' => uniqid('')]; \EvolutionCMS\Models\SystemSetting::insert($systemSettings); // Apply core-only migrations (core/database/migrations) not present in the // install/stubs chain, e.g. the system task tables. Runs after seeding so the