Repository: gohugoio/hugo (language: go)

Issue:
Disabling the taxonomyTerm page kind behaves differently in v0.112.0 and later
With this site configuration:

```toml
disableKinds = ['taxonomyTerm']
```

Published with v0.111.3

```text
public/
├── category/         <-- taxonomy page not rendered (as expected)
│   └── category-a/   <-- term page rendered (as expected)
│       ├── index.html
│       └── index.xml
├── posts/
│   ├── post-1/
│   │   └── index.html
│   ├── index.html
│   └── index.xml
├── favicon.ico
├── index.html
├── index.xml
└── sitemap.xml
```

Published with v0.112.0

```text
public/
├── category/         <-- taxonomy page rendered (unexpected), term page not rendered (unexpected)
│   ├── index.html
│   └── index.xml
├── posts/
│   ├── post-1/
│   │   └── index.html
│   ├── index.html
│   └── index.xml
├── favicon.ico
├── index.html
├── index.xml
└── sitemap.xml
```

Related: <https://github.com/gohugoio/hugo/issues/11256>

Reference: <https://discourse.gohugo.io/t/45309>


Discussion / hints:
>disableKinds = ['taxonomyTerm']


Does it work if you do 

```
disableKinds = ['term']
```

?

`disableKinds = ['taxonomy']  --> PASS`

```text
public/
├── category/
│   └── category-a/
│       ├── index.html
│       └── index.xml
├── posts/
│   ├── post-1/
│   │   └── index.html
│   ├── index.html
│   └── index.xml
├── favicon.ico
├── index.html
├── index.xml
└── sitemap.xml
```

`disableKinds = ['term']  --> PASS`

```text
public/
├── category/
│   ├── index.html
│   └── index.xml
├── posts/
│   ├── post-1/
│   │   └── index.html
│   ├── index.html
│   └── index.xml
├── favicon.ico
├── index.html
├── index.xml
└── sitemap.xml
```


Fix patch:
diff --git a/config/allconfig/allconfig.go b/config/allconfig/allconfig.go
index a0d1d0ae8e6..0dc185372fd 100644
--- a/config/allconfig/allconfig.go
+++ b/config/allconfig/allconfig.go
@@ -242,7 +242,7 @@ func (c *Config) CompileConfig(logger loggers.Logger) error {
 		kind = strings.ToLower(kind)
 		if kind == "taxonomyterm" {
 			// Legacy config.
-			kind = "term"
+			kind = "taxonomy"
 		}
 		disabledKinds[kind] = true
 	}


Test patch:
diff --git a/hugolib/config_test.go b/hugolib/config_test.go
index 9720522ad0e..ff7b01a3fa7 100644
--- a/hugolib/config_test.go
+++ b/hugolib/config_test.go
@@ -1060,7 +1060,7 @@ func TestConfigLegacyValues(t *testing.T) {
 
 	files := `
 -- hugo.toml --
-# taxonomyTerm was renamed to term in Hugo 0.60.0.
+# taxonomyTerm was renamed to taxonomy in Hugo 0.60.0.
 disableKinds = ["taxonomyTerm"]
 
 -- layouts/index.html --
@@ -1081,7 +1081,7 @@ Home
 `)
 
 	conf := b.H.Configs.Base
-	b.Assert(conf.IsKindEnabled("term"), qt.Equals, false)
+	b.Assert(conf.IsKindEnabled("taxonomy"), qt.Equals, false)
 }
 
 // Issue #11000
@@ -1534,3 +1534,39 @@ disableKinds = ["taxonomy", "term", "RSS", "sitemap", "robotsTXT", "page", "sect
 	})
 
 }
+
+// Issue #11257
+func TestDisableKindsTaxonomyTerm(t *testing.T) {
+	t.Parallel()
+
+	files := `
+-- hugo.toml --
+baseURL = "https://example.com"
+disableKinds = ['taxonomyTerm']
+[taxonomies]
+category = 'categories'
+-- content/p1.md --
+---
+title: "P1"
+categories: ["c1"]
+---
+-- layouts/index.html --
+Home.
+-- layouts/_default/list.html --
+List.
+
+
+
+`
+	b := NewIntegrationTestBuilder(
+		IntegrationTestConfig{
+			T:           t,
+			TxtarString: files,
+		},
+	).Build()
+
+	b.AssertDestinationExists("index.html", true)
+	b.AssertDestinationExists("categories/c1/index.html", true)
+	b.AssertDestinationExists("categories/index.html", false)
+
+}