Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GoogleSiteMap setting Not indexed is not set to selected in CMS #14

sminnee opened this issue Mar 31, 2012 · 1 comment


Copy link

@sminnee sminnee commented Mar 31, 2012


When setting GoogleSiteMap? setting Not indexed is not set to selected in CMS dropdown due to the -1 value.

Patch here:


This comment has been minimized.

Copy link

@MrJamesEllis MrJamesEllis commented Sep 6, 2012

The patch linked, adding "xx" doesn't work. Here's our solution to exclude pages from the Sitemap (for SS 2.4).

That, or change the key to "0" although that may hit empty() issues.

=== modified file 'googlesitemaps/code/GoogleSitemapDecorator.php'
--- googlesitemaps/code/GoogleSitemapDecorator.php      2012-09-05 03:21:49 +0000
+++ googlesitemaps/code/GoogleSitemapDecorator.php      2012-09-06 02:28:58 +0000
@@ -49,7 +49,7 @@
                $tabset->push(new Tab('GoogleSitemap', _t('SiteTree.TABGOOGLESITEMAP', 'Google Sitemap'),
                        new LiteralField("GoogleSitemapIntro", $message),
-                       new DropdownField("Priority", $this->owner->fieldLabel('Priority'), $prorities)
+                       new DropdownField("Priority", $this->owner->fieldLabel('Priority'), $prorities, $this->owner->Priority)
@@ -81,7 +81,7 @@
                        return max(0.1, 1.0 - ($numParents / 10));
                elseif ($this->owner->getField('Priority') == -1) {
-                       return 0;
+                       return -1;
                else {
                        $priority = abs($this->owner->getField('Priority'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.