Loading charts.post_update.php +16 −1 Original line number Diff line number Diff line Loading @@ -69,9 +69,24 @@ function charts_post_update_migrate_library_default_settings_to_library_config(& if ($library_id) { $old_key = 'charts_default_settings.' . $library_id . '_settings'; $library_config = $config->get($old_key); $config->set('library_config', $library_config); $config->set('charts_default_settings.library_config', $library_config); $config->clear($old_key); $config->save(); } } } /** * Clear library_config set on the wrong place. See drupal.org/i/3310145. */ function charts_post_update_clear_library_config_key_added_on_wrong_place(&$sandbox) { /** @var \Drupal\Core\Config\ConfigFactoryInterface $config_factory */ $config_factory = \Drupal::service('config.factory'); $config = $config_factory->getEditable('charts.settings'); if ($config && $config->get('library_config')) { // Not to be confused with "charts_default_settings.library_config" which is // the proper key. $config->clear('library_config'); $config->save(); } } Loading
charts.post_update.php +16 −1 Original line number Diff line number Diff line Loading @@ -69,9 +69,24 @@ function charts_post_update_migrate_library_default_settings_to_library_config(& if ($library_id) { $old_key = 'charts_default_settings.' . $library_id . '_settings'; $library_config = $config->get($old_key); $config->set('library_config', $library_config); $config->set('charts_default_settings.library_config', $library_config); $config->clear($old_key); $config->save(); } } } /** * Clear library_config set on the wrong place. See drupal.org/i/3310145. */ function charts_post_update_clear_library_config_key_added_on_wrong_place(&$sandbox) { /** @var \Drupal\Core\Config\ConfigFactoryInterface $config_factory */ $config_factory = \Drupal::service('config.factory'); $config = $config_factory->getEditable('charts.settings'); if ($config && $config->get('library_config')) { // Not to be confused with "charts_default_settings.library_config" which is // the proper key. $config->clear('library_config'); $config->save(); } }