run migrations & build assets after updating status

This commit is contained in:
Boy132 2025-11-11 14:56:08 +01:00
parent 37f9e27ac4
commit 009f6443d3

View File

@ -260,10 +260,6 @@ class PluginService
try {
$this->manageComposerPackages(json_decode($plugin->composer_packages, true, 512));
$this->runPluginMigrations($plugin);
$this->buildAssets();
if ($enable) {
$this->enablePlugin($plugin);
} else {
@ -271,6 +267,10 @@ class PluginService
$this->disablePlugin($plugin);
}
}
$this->buildAssets();
$this->runPluginMigrations($plugin);
} catch (Exception $exception) {
$this->handlePluginException($plugin, $exception);
}
@ -296,14 +296,14 @@ class PluginService
$this->rollbackPluginMigrations($plugin);
$this->buildAssets();
if ($deleteFiles) {
$this->deletePlugin($plugin);
} else {
$this->setStatus($plugin, PluginStatus::NotInstalled);
}
$this->buildAssets();
$this->manageComposerPackages(oldPackages: $pluginPackages);
} catch (Exception $exception) {
$this->handlePluginException($plugin, $exception);