Respect front page configuration

Created on 15 February 2022, over 2 years ago
Updated 17 April 2024, 2 months ago

Problem/Motivation

When a front page is configured in the site's system settings then the sitemap will either generate a link like e..g node/123 or use the alias for the configured node. However as this page will always redirect to the front page "/" we should rather respect that configuration and exchange the url.

Steps to reproduce

Set a front page and rebuild the sitemap. Check the url for the front page.

Proposed resolution

Check if the url is the same as the front page and if so return the front page route.

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Closed: won't fix

Version

4.0

Component

Code

Created by

🇩🇪Germany hchonov 🇪🇺🇩🇪🇧🇬

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States caspervoogt

    I tested this and it worked for me. It solved the issue, and I saw no regressions.

  • 🇲🇾Malaysia ckng

    Patch #2 tested working.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 8
    last update 8 months ago
    32 pass
  • 🇫🇮Finland mmyllynen

    Patch from #2 has been working nicely but looks like it needed re-rolling so here goes.

  • Status changed to Closed: won't fix 8 months ago
  • 🇩🇪Germany gbyte Berlin

    Or you could just leave the '/' in custom links right as it is defined by default. The node path will then be automatically excluded as duplicate (also the default setting).

    Thanks for the patch! I feel however like this is too much of a change (in terms of compatibility with extending modules) for a niche use case that will not happen with default settings, hence marking as "won't fix".

  • 🇧🇪Belgium tim-diels Belgium 🇧🇪

    @gbyte Just installed a clean Drupal 10 site and configured the defaults but got both the root as / and the node with its alias /homepage.
    So I'm not really following why this is closed as more ppl have reported this.

    Is there a test that we can run to make sure this won't happen?

  • First commit to issue fork.
  • 🇨🇦Canada zhezhangrandy

    Seems this patch needs a re-roll for 4.1.8

  • 🇩🇪Germany hchonov 🇪🇺🇩🇪🇧🇬

    Re-roll.

Production build 0.69.0 2024