Clicking on paths /admin/compact/on or /admin/compact/off gives a fatal error:

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "front" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 127 of drupal-8/core/lib/Drupal/Core/Routing/RouteProvider.php).

For example: click on "Hide descriptions" or "Show descriptions" in admin/config.

Files: 
CommentFileSizeAuthor
#20 2076551-20-test_only.patch1.9 KBpfrenssen
FAILED: [[SimpleTest]]: [MySQL] 58,945 pass(es), 4 fail(s), and 0 exception(s).
[ View ]
#20 2076551-20.patch2.48 KBpfrenssen
PASSED: [[SimpleTest]]: [MySQL] 58,789 pass(es).
[ View ]
#11 2076551-11-tests_only.patch1.9 KBpfrenssen
FAILED: [[SimpleTest]]: [MySQL] 59,246 pass(es), 4 fail(s), and 0 exception(s).
[ View ]
#11 2076551-11.patch2.48 KBpfrenssen
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 2076551-11.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#11 interdiff.txt2.49 KBpfrenssen
#2 2076551-2-tests_only.patch1.92 KBpfrenssen
FAILED: [[SimpleTest]]: [MySQL] 58,469 pass(es), 4 fail(s), and 0 exception(s).
[ View ]
#2 2076551-2.patch2.5 KBpfrenssen
PASSED: [[SimpleTest]]: [MySQL] 58,424 pass(es).
[ View ]
#1 2076551-1.patch592 bytespwolanin
PASSED: [[SimpleTest]]: [MySQL] 58,498 pass(es).
[ View ]

Comments

Status:Active» Needs review
Issue tags:+Needs tests
StatusFileSize
new592 bytes
PASSED: [[SimpleTest]]: [MySQL] 58,498 pass(es).
[ View ]

This fixes the bug, but we should add some minimal test coverage too.

StatusFileSize
new2.5 KB
PASSED: [[SimpleTest]]: [MySQL] 58,424 pass(es).
[ View ]
new1.92 KB
FAILED: [[SimpleTest]]: [MySQL] 58,469 pass(es), 4 fail(s), and 0 exception(s).
[ View ]

Here's a test.

Issue tags:-Needs tests

Removing tag.

+++ b/core/modules/system/lib/Drupal/system/Tests/System/AdminTest.php
@@ -42,6 +42,9 @@ function setUp() {
+    // Configure 'admin' as front page, so we can test redirects.
+    \Drupal::config('system.site')->set('page.front', 'admin')->save();

This code looks strange, can you comment on why this was needed?

If I do not put that line there the front page is not defined and the redirect is not executed.

By default the frontpage is 'node', but the node module is not enabled in this test, so I opted for 'admin'.

Status:Needs review» Needs work

Woops, I copy/pasted these lines and forgot to change "on" into "off"

     $this->drupalGet('admin/compact/off');
+    $this->assertResponse(200, 'A valid page is returned after turning on compact mode.');
+    $this->assertUrl('<front>', array(), 'The user is redirected to the front page after turning on compact mode.');

Shall we reword the comment for the front page configuration as well? Maybe

Configure the front page so we can test redirects to it. Usually this is set to 'node' but the node module is not enabled in this test.

Yes, a more elaborate comment would be great.

I still don't know really get why that is necessary.

As far as I know, the default front page is 'user' in D8 and user.module should always be enabled. But let's not hold this up on any more on that detail. As long as it's green...

+++ b/core/modules/system/lib/Drupal/system/Tests/System/AdminTest.php
@@ -42,6 +42,9 @@ function setUp() {
+    \Drupal::config('system.site')->set('page.front', 'admin')->save();

should be $this->container->get(...

Assigned:Unassigned» pfrenssen

Will address remarks.

Assigned:Unassigned» pfrenssen
StatusFileSize
new2.49 KB
new2.48 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 2076551-11.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
new1.9 KB
FAILED: [[SimpleTest]]: [MySQL] 59,246 pass(es), 4 fail(s), and 0 exception(s).
[ View ]

@tstoeckler, you're right. The front page is by default indeed set to 'user', but if a user is logged in this redirects to 'user/{uid}'. This causes $this->assertUrl('<front>') to fail, since it looks at the redirected url and this does not match the original url.

The test now checks for the redirected url.

Assigned:pfrenssen» Unassigned
Status:Needs work» Needs review

Assigned:pfrenssen» Unassigned

Haven't we decided to go with 'front' as routename?

If so, we need to change it back.

'<front>':
  pattern: '/'
  requirements:
    _access: 'TRUE'

Thanks @pfrenssen for figuring that out. It's much clearer now, especially with the comment!

It's been over two weeks, let's see if this needs a reroll.

#11: 2076551-11-tests_only.patch queued for re-testing.

#11: 2076551-11.patch queued for re-testing.

Status:Needs review» Needs work

The last submitted patch, 2076551-11.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new2.48 KB
PASSED: [[SimpleTest]]: [MySQL] 58,789 pass(es).
[ View ]
new1.9 KB
FAILED: [[SimpleTest]]: [MySQL] 58,945 pass(es), 4 fail(s), and 0 exception(s).
[ View ]

Rerolled against latest HEAD.

Status:Needs review» Reviewed & tested by the community

This looks good to go.

#20: 2076551-20.patch queued for re-testing.

Status:Reviewed & tested by the community» Needs work

The last submitted patch, 2076551-20.patch, failed testing.

Status:Needs work» Needs review

#20: 2076551-20.patch queued for re-testing.

Status:Needs review» Reviewed & tested by the community

Status:Reviewed & tested by the community» Fixed

Committed and pushed to 8.x. Thanks!

Status:Fixed» Closed (fixed)

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

Issue summary:View changes

Added manual testing instructions.