diff --git a/core/modules/contact/contact.module b/core/modules/contact/contact.module index 5df5466..6a61e05 100644 --- a/core/modules/contact/contact.module +++ b/core/modules/contact/contact.module @@ -86,8 +86,6 @@ function contact_menu() { ); $items['contact/%contact_category'] = array( 'title' => 'Contact category form', - 'title callback' => 'entity_page_label', - 'title arguments' => array(1), 'route_name' => 'contact.site_page_category', 'type' => MENU_VISIBLE_IN_BREADCRUMB, ); diff --git a/core/modules/contact/lib/Drupal/contact/Tests/ContactPersonalTest.php b/core/modules/contact/lib/Drupal/contact/Tests/ContactPersonalTest.php index e974ec6..2c95d3b 100644 --- a/core/modules/contact/lib/Drupal/contact/Tests/ContactPersonalTest.php +++ b/core/modules/contact/lib/Drupal/contact/Tests/ContactPersonalTest.php @@ -94,6 +94,8 @@ function testPersonalContactAccess() { $this->drupalLogin($this->web_user); $this->drupalGet('user/' . $this->admin_user->id() . '/contact'); $this->assertResponse(200); + // Check the page title is properly displayed. + $this->assertText(t('Contact @username', array('@username' => $this->admin_user->getUsername()))); // Test denied access to admin user's own contact form. $this->drupalLogout(); diff --git a/core/modules/contact/lib/Drupal/contact/Tests/ContactSitewideTest.php b/core/modules/contact/lib/Drupal/contact/Tests/ContactSitewideTest.php index 05908c2..b8ae287 100644 --- a/core/modules/contact/lib/Drupal/contact/Tests/ContactSitewideTest.php +++ b/core/modules/contact/lib/Drupal/contact/Tests/ContactSitewideTest.php @@ -129,6 +129,9 @@ function testSiteWideContact() { $this->assertEqual($config['reply'], $reply); $this->assertNotEqual($id, \Drupal::config('contact.settings')->get('default_category')); $this->assertRaw(t('Category %label has been updated.', array('%label' => $label))); + // Ensure the label is displayed on the contact page for this category. + $this->drupalGet('contact/' . $id); + $this->assertText($label); // Reset the category back to be the default category. \Drupal::config('contact.settings')->set('default_category', $id)->save();