This seems too obvious to be a bug. I'm probably not understanding something or missing the obvious.

1) Launch a new Drupal 8 Site
2) Go to Manage > Configuration > System > Front Page AND remove "node" so that this line is blank
3) Logout of the site

If you do this, there is a user login form on the front page. It's not clear to me where this is coming from or how to remove it.

It appears that Drupal is defaulting to the User page if there is no Front Page listed on the System Configuration page. Is this intentional?

Comments

stpaultim created an issue. See original summary.

stpaultim’s picture

Issue summary: View changes
dawehner’s picture

Seems so:

  /**
   * {@inheritdoc}
   */
  public function validateForm(array &$form, FormStateInterface $form_state) {
    // Check for empty front page path.
    if ($form_state->isValueEmpty('site_frontpage')) {
      // Set to default "user/login".
      $form_state->setValueForElement($form['front_page']['site_frontpage'], '/user/login');
    }

in \Drupal\system\Form\SiteInformationForm

One thing you could maybe try is: set it to <none>.

stpaultim’s picture

Status: Active » Closed (works as designed)

@dawehner - Thanks, but changing the setting to does not work.

However, I did more research on how this is different from Drupal 7 and found the following.

The simple use case for this question, was if I wanted to simply edit the page--front.tpl.php file to display some blocks of content on the front page without any nodes or views. In looking back, I had the same problem in Drupal 7 with the "No front page content has been created yet." message. But, because I had no content, I could just remove the "content" region from the template and be happy.

With Drupal 8 - it seems like in the same scenario the "No front page content has been created yet" message has been replaced with the user page or if no user is logged in, the login page. Again, I can remove this by removing the "content" region from the page--front.html.twig file. However, with Drupal 8, I also need to remove the "Header" region to hide the tabs.

I recognize that there is lots of discussion about the "Front Page" in Drupal #2514794: Frontpage view is confusing when only one node is promoted to the default front page - and by doing the the things mentioned, I can accomplish what I was able to do in Drupal 7, so I am happy.

These were the two blocks I removed from the front page template.

        {# Content #}
        {% block content %}
          <a id="main-content"></a>
          {{ page.content }}
        {% endblock %}

      {# Header #}
      {% if page.header %}
        {% block header %}
          <div class="col-sm-12" role="heading">
            {{ page.header }}
          </div>
        {% endblock %}
      {% endif %}
stpaultim’s picture

#4 Does not work, because the login page seems to use the front page template. So, if you click on the link for user/login the login form no longer displays.

juegas’s picture

Found this to be annoying also... here's how I got the tabs/form to be gone.

Config:
1. got /admin/config/system/site-information?q=/admin/config/system/site-information
2. set default front page to "/"
3. save

Site Building:
1. create page--front.html.twig
2. create basic page and give it a URL alias of "/"
3. drush cr or clear cache through UI

It looks like there needs to be a node for Drupal to attach the template to before block-layout configuration applies and hides the tabs/form.