Disable frontpage view

Created on 16 February 2023, almost 2 years ago
Updated 21 December 2023, 12 months ago

Problem/Motivation

If this module is active, the "frontpage" view probably becomes useless, and perhaps it is more appropriate to deactivate it, given that it remains reachable with the path /node

Proposed resolution

A new configuration during installation that disables the view, or a configuration via the UI, similar to this module:
https://www.drupal.org/project/disable_page_slash_node

Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

🇮🇹Italy maurizio_akabit

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @maurizio_akabit
  • Assigned to samit.310@gmail.com
  • Status changed to Needs work over 1 year ago
  • 🇮🇳India samit.310@gmail.com

    I am working on it.

  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India samit.310@gmail.com

    configuration added Please review.

    Thanks
    Samit K.

  • 🇮🇹Italy maurizio_akabit

    The patch fails using the latest dev version.
    In my opinion, looking at the code, we should perform a check to verify the existence of the frontpage view, as it doesn't exist in the minimal Drupal installation.

  • 🇺🇸United States Greg Boggs Portland Oregon

    How about we solve this one by making disable_page_slash_node a dependency? That way we can avoid maintaining the code for that and help a related module get usage when it's code is solid.

  • 🇩🇰Denmark ressa Copenhagen

    Isn't this method the simplest method to do it via configuration?

    1. Go to /admin/structure/views/view/frontpage
    2. Under "No results behavior" > click "Rearrange"
    3. Remove these fields and save:
      Global: Unfiltered text Global: Unfiltered text
      Content: Empty Node Frontpage behavior Content
      Global: Title override Global: Title override

    From https://www.drupal.org/forum/support/post-installation/2011-02-02/delete...

    I ask because I like to keep the number of modules to a minimum in my projects, and installing two modules for this seems a bit overkill to me ...

  • 🇺🇸United States Greg Boggs Portland Oregon

    In Drupal, there are many different ways to solve problems. Your method loads an entire database view which requires tons of very expensive database queries based on "select * from node" to run. On a site with 20 pages, this is trivial, on a large site with 100,000 pages this is a very expensive way to not print any content on a page.

  • 🇩🇰Denmark ressa Copenhagen

    Ah yes, you're right, thanks for clarifying.

Production build 0.71.5 2024