diff -u b/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc --- b/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -1740,6 +1740,7 @@ // This form allows page compression settings to be changed, which can // invalidate the page cache, so it needs to be cleared on form submit. $form['#submit'][] = 'system_clear_page_cache_submit'; + $form['#submit'][] = 'system_performance_settings_submit'; return system_config_form($form, $form_state); } diff -u b/core/modules/system/system.module b/core/modules/system/system.module --- b/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -3042,7 +3042,8 @@ * @see system_config_form_submit() * @ingroup forms * - * @todo D8: Replace this temporary helper with a more sophisticated solution. + * @todo Replace this temporary helper with a more sophisticated solution: + * http://drupal.org/node/1324618. */ function system_config_form($form, &$form_state) { $form['actions']['#type'] = 'actions'; @@ -3050,11 +3051,20 @@ '#type' => 'submit', '#value' => t('Save configuration'), ); - // Add the form's primary submit handler for saving configuration values and - // append system_config_form_submit() to output a consistent confirmation - // message. - $form['#submit'][] = $form_state['build_info']['form_id'] . '_submit'; - $form['#submit'][] = 'system_settings_form_submit'; + + // Add system_config_form_submit() to output a consistent confirmation + // message. Since this prevents drupal_prepare_form() from adding the form's + // primary submit handler, do that first, using the same logic. + if (!isset($form['#submit'])) { + $form['#submit'] = array(); + if (function_exists($form_state['build_info']['form_id'] . '_submit')) { + $form['#submit'][] = $form_state['build_info']['form_id'] . '_submit'; + } + elseif (isset($form_state['build_info']['base_form_id']) && function_exists($form_state['build_info']['base_form_id'] . '_submit')) { + $form['#submit'][] = $form_state['build_info']['base_form_id'] . '_submit'; + } + } + $form['#submit'][] = 'system_config_form_submit'; // By default, render the form using theme_system_settings_form(). if (!isset($form['#theme'])) { @@ -3065,6 +3075,8 @@ /** * Form submission handler for system_config_form(). + * + * @see system_config_form() */ function system_config_form_submit($form, &$form_state) { drupal_set_message(t('The configuration options have been saved.'));