Excluding a single node from sitemap is not as straightforward as it should be when node is in menu system.

Created on 26 October 2023, over 1 year ago

Problem/Motivation

Sometimes when I would like to exclude content from the sitemap.xml changing sitemap settings from include, to exclude, solely on a node, it doesn't work.

I have two sitemap entities



Steps to reproduce

#### Create node
Add node to menu
In menu setting, node is added to set the sitemap settings to include
In the node set the sitemap settings to include
Rebuild sitemap
Look at sitemap and see node

#### Remove from sitemap
Edit node and set the sitemap settings to exclude
Rebuild sitemap
See node still in sitemap
Edit menu the node is in
Set menu link sitemap settings to exclude
Rebuild sitemap
See node removed from sitemap.

#### Remove from sitemap (method 2)
Unpublish node
Rebuild sitemap
See node removed from sitemap.

The above scenario is not ideal because you have to change the sitemap settings in more than one place for the same piece of content.

Proposed resolution

Determine a better way to resolve whether something should be in the sitemap or not.
In my opinion nodes should be able to be excluded on an individual basis, even if they are in the menu without having to modify in both the node and menu settings. Because that is what our users expect.

πŸ› Bug report
Status

Active

Version

2.0

Component

xmlsitemap.module

Created by

πŸ‡ΊπŸ‡ΈUnited States trackleft2 Tucson, AZ πŸ‡ΊπŸ‡Έ

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

Comments & Activities

Production build 0.71.5 2024