diff -u b/core/lib/Drupal/Core/Form/FormBuilder.php b/core/lib/Drupal/Core/Form/FormBuilder.php --- b/core/lib/Drupal/Core/Form/FormBuilder.php +++ b/core/lib/Drupal/Core/Form/FormBuilder.php @@ -390,7 +390,7 @@ * {@inheritdoc} */ public function setCache($form_build_id, $form, $form_state) { - $expire = \Drupal::config('system.performance')->get('cache.expire.form'); + $expire = \Drupal::config('system.performance')->get('cache.form.expire'); // Cache form structure. if (isset($form)) { if ($this->currentUser()->isAuthenticated()) { diff -u b/core/modules/system/config/schema/system.schema.yml b/core/modules/system/config/schema/system.schema.yml --- b/core/modules/system/config/schema/system.schema.yml +++ b/core/modules/system/config/schema/system.schema.yml @@ -195,11 +195,11 @@ max_age: type: integer label: 'Max age of page cache' - expire: + form: type: mapping - label: 'Cache lifetime timeouts' + label: 'Form cache settings' mapping: - form: + expire: type: integer label: 'Form cache timeout' css: diff -u b/core/modules/system/config/system.performance.yml b/core/modules/system/config/system.performance.yml --- b/core/modules/system/config/system.performance.yml +++ b/core/modules/system/config/system.performance.yml @@ -2,8 +2,8 @@ page: use_internal: false max_age: 0 - expire: - form: 21600 + form: + expire: 21600 css: preprocess: false gzip: true only in patch2: unchanged: --- a/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php @@ -41,6 +41,7 @@ public function setUp() { $container = new ContainerBuilder(); $container->set('url_generator', $this->urlGenerator); + $container->set('config.factory', $this->getConfigFactoryStub(array())); \Drupal::setContainer($container); }