diff --git a/core/modules/config/src/Form/ConfigSingleExportForm.php b/core/modules/config/src/Form/ConfigSingleExportForm.php index d278e79..8c36f70 100644 --- a/core/modules/config/src/Form/ConfigSingleExportForm.php +++ b/core/modules/config/src/Form/ConfigSingleExportForm.php @@ -145,15 +145,21 @@ public function updateConfigurationType($form, FormStateInterface $form_state) { public function updateExport($form, FormStateInterface $form_state) { // Determine the full config name for the selected config entity. if ($form_state->getValue('config_type') !== 'system.simple') { + $value = $this->entityManager + ->getStorage($form_state->getValue('config_type')) + ->load($form_state->getValue('config_name')) + ->toArray(); + $definition = $this->entityManager->getDefinition($form_state->getValue('config_type')); $name = $definition->getConfigPrefix() . '.' . $form_state->getValue('config_name'); } // The config name is used directly for simple configuration. else { $name = $form_state->getValue('config_name'); + $value = $this->configStorage->read($name); } // Read the raw data for this config name, encode it, and display it. - $form['export']['#value'] = Yaml::encode($this->configStorage->read($name)); + $form['export']['#value'] = Yaml::encode($value); $form['export']['#description'] = $this->t('Filename: %name', array('%name' => $name . '.yml')); return $form['export']; }