On the front page, the page title is missing. This results in <title> | Drupal 8</title> instead of <title>Home | Drupal 8</title>.
Patch follows.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

BarisW’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
547 bytes
BarisW’s picture

By the way; this happens when you have some content on the front page. To reproduce it, just create a node and visit the front page. Notice the page title in the browser window.

BarisW’s picture

Title: Front page missed page title in HEAD » Front page misses page title in <title> tag
BarisW’s picture

FileSize
1.66 KB
1.13 KB

And now with a test as well.

Status: Needs review » Needs work

The last submitted patch, 4: 2150123-4-node-add-page-title-tests-only.patch, failed testing.

BarisW’s picture

Status: Needs work » Needs review

The last submitted patch, 4: 2150123-4-node-add-page-title.patch, failed testing.

The last submitted patch, 4: 2150123-4-node-add-page-title.patch, failed testing.

BarisW’s picture

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Perfect!

amateescu’s picture

+++ b/core/modules/system/lib/Drupal/system/Tests/System/FrontPageTest.php
@@ -44,6 +44,20 @@ function setUp() {
+  public function testFrontPageTitle() {

This will do a full Drupal install (which adds a few seconds to the testing time) for a single assertion, wouldn't it be better to stick it in testDrupalIsFrontPage() and rename that one?

BarisW’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
1.74 KB
1.06 KB

Ah, why not. Good point!

amateescu’s picture

+++ b/core/modules/system/lib/Drupal/system/Tests/System/FrontPageTest.php
@@ -44,9 +44,9 @@
+  function testDrupalFrontPage() {

This should be public function ... ;)

BarisW’s picture

Fine with me, but I only changed its name. It has always been without the 'public'? Should I add it?

amateescu’s picture

Well.. since we're already touching that line in the patch, we usually cleanup things like this as we go.

BarisW’s picture

FileSize
1.75 KB
dawehner’s picture

Priority: Normal » Major
Status: Needs review » Reviewed & tested by the community

Feedback got adressed. I kind of consider this as a major bug, given that this is the first impression of drupal for people.

amateescu’s picture

Thanks, Baris! RTBC++

The last submitted patch, 12: interdiff-4-12.patch, failed testing.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.