A node type can be prevented from appearing in the sitemap by setting its priority to -1 at the XML Sitemap settings page (admin/settings/gsitemap). However, I am still given the opportunity to override the priority when creating a new node, which doesn't make sense. The expected behavior for the "Priority override" form field is to not show up when it has been disabled in the global settings.

The attached patch fixes this by checking the node type's global priority setting before altering the node's form.

CommentFileSizeAuthor
#1 gsitemap_override.patch1.34 KBsmk-ka
gsitemap_form_alter.patch899 bytessmk-ka

Comments

smk-ka’s picture

StatusFileSize
new1.34 KB

Revised patch doesn't insert into/update the gsitemap table, which would be meaningless when the node type is globally ignored.

darren oh’s picture

Status: Needs review » Fixed

Fixed in CVS commit 83572. Adding an entry to the gsitemap table is still necessary so that admins can change their minds about which node types to include in the site map.

darren oh’s picture

Version: master » 5.x-1.x-dev
Anonymous’s picture

Status: Fixed » Closed (fixed)