Problem/Motivation

When overwriting the sites default front page in settings.php the wrong page is served and everything that relies on isFrontPage() is broken. For example: the front page specific block layout/placing is not applied.

Example config in settings.php:

$config['system.site']['page']['front'] = 'node/X';

Proposed resolution

To be defined

Remaining tasks

- Find the problematic code.
- Write patch
- Write test

User interface changes

None

API changes

None

Data model changes

None

Comments

dmsmidt created an issue. See original summary.

dmsmidt’s picture

Issue summary: View changes
dmsmidt’s picture

Ok:

Drupal\Core\Path\PathMatcher->getFrontPagePath();

Not Ok:

Drupal\Core\Path\PathMatcher->isFrontPage();
dmsmidt’s picture

Status: Active » Closed (works as designed)

Hmm, some cache rebuild it does work.
I was tricked because without a cache rebuild, and setting the the $config, you see that things change (for the worse).

Also notes: make sure you use a leading slash:

$config['system.site']['page']['front'] = '/node/X';