From 6472c782536c80c49f16f670b46f87c773e26179 Mon Sep 17 00:00:00 2001 From: Stanislas Date: Tue, 26 Nov 2024 08:17:13 +0100 Subject: [PATCH] Fix(Core): generate Dropdown before Container (#862) --- setup.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/setup.php b/setup.php index d47a31bd..01a3044f 100644 --- a/setup.php +++ b/setup.php @@ -265,6 +265,15 @@ function plugin_fields_checkFiles() // Clean all existing files array_map('unlink', glob(PLUGINFIELDS_DOC_DIR . '/*/*')); + // Regenerate dropdowns + if ($DB->tableExists(PluginFieldsField::getTable())) { + $fields_obj = new PluginFieldsField(); + $fields = $fields_obj->find(['type' => 'dropdown']); + foreach ($fields as $field) { + PluginFieldsDropdown::create($field); + } + } + // Regenerate containers if ($DB->tableExists(PluginFieldsContainer::getTable())) { $container_obj = new PluginFieldsContainer(); @@ -275,14 +284,6 @@ function plugin_fields_checkFiles() } } - // Regenerate dropdowns - if ($DB->tableExists(PluginFieldsField::getTable())) { - $fields_obj = new PluginFieldsField(); - $fields = $fields_obj->find(['type' => 'dropdown']); - foreach ($fields as $field) { - PluginFieldsDropdown::create($field); - } - } } function plugin_fields_exportBlockAsYaml($container_id = null)