Skip to content

Commit e77ea5e

Browse files
authored
Merge pull request #2436 from elcreator/fix-cli-install-manager-theme
fix(install): write manager_theme and site_id on a CLI install
2 parents bf3d510 + 756093a commit e77ea5e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎install/cli-install.php‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,13 @@ public function migrationAndSeed()
598598
$systemSettings[] = ['setting_name' => 'auto_template_logic', 'setting_value' => 1];
599599
$systemSettings[] = ['setting_name' => 'emailsender', 'setting_value' => $this->cmsAdminEmail];
600600
$systemSettings[] = ['setting_name' => 'fe_editor_lang', 'setting_value' => $this->language];
601+
// The web installer writes these two at installLevel 4
602+
// (install/src/controllers/install.php); this path never reached them,
603+
// so a CLI-installed site had no manager_theme and the manager built
604+
// its stylesheet URL as media/style//style.css - a 404, leaving the
605+
// whole manager unstyled.
606+
$systemSettings[] = ['setting_name' => 'manager_theme', 'setting_value' => 'default'];
607+
$systemSettings[] = ['setting_name' => 'site_id', 'setting_value' => uniqid('')];
601608
\EvolutionCMS\Models\SystemSetting::insert($systemSettings);
602609
// Apply core-only migrations (core/database/migrations) not present in the
603610
// install/stubs chain, e.g. the system task tables. Runs after seeding so the

0 commit comments

Comments
 (0)