Skip to content

Commit

Permalink
【テーマプラグイン】テーマ適用時にエラーメッセージが表示されプラグインがインストールされない問題を改善 fix #4013
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuring committed Nov 17, 2024
1 parent 71e89af commit 7cdd2b6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plugins/baser-core/src/Service/ThemesService.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
use BaserCore\Annotation\Checked;
use BaserCore\Utility\BcZip;
use BcMail\Service\MailMessagesServiceInterface;
use Cake\Core\App;
use Cake\Core\Configure;
use Cake\Core\Plugin;
use Cake\Datasource\EntityInterface;
Expand Down Expand Up @@ -286,6 +287,12 @@ private function getThemesDefaultDataInfo(string $theme, array $info = [])
*/
public function installThemesPlugins(string $theme)
{
$paths = App::path('plugins');
$path = BcUtil::getPluginPath($theme) . 'plugins' . DS;
if(!is_dir($path)) return;
if(!in_array($path, $paths)) {
Configure::write('App.paths.plugins', array_merge($paths, [$path]));
}
/* @var PluginsService $pluginsService */
$pluginsService = $this->getService(PluginsServiceInterface::class);
$plugins = BcUtil::getThemesPlugins($theme);
Expand Down

0 comments on commit 7cdd2b6

Please sign in to comment.