diff --git a/plugins/baser-core/src/Service/BcDatabaseService.php b/plugins/baser-core/src/Service/BcDatabaseService.php index 41a36e98af..2d9692659f 100644 --- a/plugins/baser-core/src/Service/BcDatabaseService.php +++ b/plugins/baser-core/src/Service/BcDatabaseService.php @@ -324,11 +324,8 @@ public function dropTable(string $tableName) */ public function loadDefaultDataPattern(string $theme, string $pattern, string $dbConfigKeyName = 'default'): bool { - $plugins = array_merge( - ['BaserCore'], - Configure::read('BcApp.corePlugins'), - BcUtil::getCurrentThemesPlugins() - ); + $folderUtility = new BcFolder(Plugin::path($theme) . 'config' . DS . 'data' . DS . $pattern); + $plugins = $folderUtility->getFolders(); $db = $this->getDataSource($dbConfigKeyName); $db->begin();