Skip to content
Snippets Groups Projects
Commit a8391320 authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2245783 by tim.plunkett: Regression: Help blocks display on 403/404 page.

parent 2867e69a
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -88,6 +88,15 @@ public function testHelp() { ...@@ -88,6 +88,15 @@ public function testHelp() {
* An HTTP response code. * An HTTP response code.
*/ */
protected function verifyHelp($response = 200) { protected function verifyHelp($response = 200) {
$this->drupalGet('admin/index');
$this->assertResponse($response);
if ($response == 200) {
$this->assertText('This page shows you all available administration tasks for each module.');
}
else {
$this->assertNoText('This page shows you all available administration tasks for each module.');
}
foreach ($this->getModuleList() as $module => $name) { foreach ($this->getModuleList() as $module => $name) {
// View module help node. // View module help node.
$this->drupalGet('admin/help/' . $module); $this->drupalGet('admin/help/' . $module);
......
...@@ -91,8 +91,8 @@ public function access(AccountInterface $account) { ...@@ -91,8 +91,8 @@ public function access(AccountInterface $account) {
protected function getActiveHelp(Request $request) { protected function getActiveHelp(Request $request) {
$output = ''; $output = '';
$router_path = $request->attributes->get('_system_path'); $router_path = $request->attributes->get('_system_path');
// We will always have a path unless we are on a 403 or 404. // Do not show on a 403 or 404 page.
if (!$router_path) { if ($request->attributes->has('exception')) {
return ''; return '';
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment