core/lib/Drupal/Core/Render/Renderer.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/lib/Drupal/Core/Render/Renderer.php b/core/lib/Drupal/Core/Render/Renderer.php index 00ee1a2..9e2c521 100644 --- a/core/lib/Drupal/Core/Render/Renderer.php +++ b/core/lib/Drupal/Core/Render/Renderer.php @@ -484,6 +484,9 @@ protected function processPostRenderCache(array &$elements) { * @see ::saveToCache() */ protected function cacheGet(array $elements) { + // Form submissions rely on the form being built during the POST request, + // and render caching of forms prevents this from happening. + // @todo remove the isMethodSafe() check when https://www.drupal.org/node/2367555 lands. if (!$this->requestStack->getCurrentRequest()->isMethodSafe() || !$cid = $this->createCacheID($elements)) { return FALSE; } @@ -511,7 +514,9 @@ protected function cacheGet(array $elements) { * @see ::getFromCache() */ protected function cacheSet(array &$elements) { - // Create the cache ID for the element. + // Form submissions rely on the form being built during the POST request, + // and render caching of forms prevents this from happening. + // @todo remove the isMethodSafe() check when https://www.drupal.org/node/2367555 lands. if (!$this->requestStack->getCurrentRequest()->isMethodSafe() || !$cid = $this->createCacheID($elements)) { return FALSE; }