Loading core/includes/theme.inc +1 −1 Original line number Diff line number Diff line Loading @@ -1374,7 +1374,7 @@ function template_preprocess_page(&$variables) { $variables['db_is_active'] = FALSE; } if ($node = \Drupal::routeMatch()->getParameter('node')) { if (($node = \Drupal::routeMatch()->getParameter('node')) || ($node = \Drupal::routeMatch()->getParameter('node_preview'))) { $variables['node'] = $node; } } Loading core/profiles/demo_umami/tests/src/Functional/DemoUmamiProfileTest.php +6 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,12 @@ public function testEditNodesByAdmin() { $node = reset($nodes); $this->drupalGet($node->toUrl('edit-form')); $webassert->statusCodeEquals('200'); $this->submitForm([], 'Preview'); $webassert->statusCodeEquals('200'); $this->assertSession()->elementsCount('css', 'h1', 1); $this->clickLink('Back to content editing'); $this->submitForm([], "Save"); $webassert->pageTextContains('Recipe Deep mediterranean quiche has been updated.'); } Loading Loading
core/includes/theme.inc +1 −1 Original line number Diff line number Diff line Loading @@ -1374,7 +1374,7 @@ function template_preprocess_page(&$variables) { $variables['db_is_active'] = FALSE; } if ($node = \Drupal::routeMatch()->getParameter('node')) { if (($node = \Drupal::routeMatch()->getParameter('node')) || ($node = \Drupal::routeMatch()->getParameter('node_preview'))) { $variables['node'] = $node; } } Loading
core/profiles/demo_umami/tests/src/Functional/DemoUmamiProfileTest.php +6 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,12 @@ public function testEditNodesByAdmin() { $node = reset($nodes); $this->drupalGet($node->toUrl('edit-form')); $webassert->statusCodeEquals('200'); $this->submitForm([], 'Preview'); $webassert->statusCodeEquals('200'); $this->assertSession()->elementsCount('css', 'h1', 1); $this->clickLink('Back to content editing'); $this->submitForm([], "Save"); $webassert->pageTextContains('Recipe Deep mediterranean quiche has been updated.'); } Loading