Using disableKinds not working for taxonomy term

This disableKinds = ["taxonomyTerm"] works locally, but not on Cloudflare Pages. What could be the issue? Locally it returns a blank white page, but on Cloudflare Pages, it still shows the section with header and footer, but blank main section.

I want to disable the /category/ page but retain /category/name/ pages.

1 Like

What version of Hugo are you using locally?
Which version of Hugo is running on Cloudflare?

See:
https://developers.cloudflare.com/pages/framework-guides/deploy-a-hugo-site#using-a-specific-hugo-version

The page kinds were changed with v0.73.0:
https://github.com/gohugoio/hugo/releases/tag/v0.73.0

With v0.73.0 and later, the page kinds are “term” and “taxonomy”. There is no “taxonomyTerm” anymore.

Also, from https://developers.cloudflare.com/pages/platform/known-issues:

Hugo builds automatically run an old version. To run the latest version of Hugo (for instance, 0.80.0), you will need to set an environment variable. Set HUGO_VERSION to 0.80.0 or the Hugo version of your choice.

0.90.0

Do I disable term or taxonomy? The latter triggered an error on localhost.

You have the value 'taxonomy' in the disabledKinds list. In Hugo 0.73.0 we fixed these to be what most people expect (taxonomy and term).
But this also means that your site configuration may not do what you expect. If it is correct, you can suppress this message by following the instructions below.
If you feel that this should not be logged as an ERROR, you can ignore it by adding this to your site config:
ignoreErrors = ["error-disable-taxonomy"]
logged 1 error(s)

If you disable term, you end up with an empty taxonomy page.

If you disable taxonomy, the term pages are generated but the taxonomy page is not. Yes, this generates an error:

You have the value ‘taxonomy’ in the disabledKinds list. In Hugo 0.73.0 we fixed these to be what most people expect (taxonomy and term). But this also means that your site configuration may not do what you expect.

If you read the remainder of the message, it tells you what to do:

If it is correct, you can suppress this message by following the instructions below. If you feel that this should not be logged as an ERROR, you can ignore it by adding this to your site config:
ignoreErrors = [“error-disable-taxonomy”]

Do what it says.

It works locally but not on CloudFlare Pages. Configured latest Hugo and go version 1.17 on pages.

1 Like

Then the two environments are different.

Are you sure the local and remote repositories are identical?
Are you sure that you are running the same version in both locations?

If yes to both, contact their support group.

Perhaps you have configured v0.90.0 remotely, but it is not available there, so it falls back to something really old? Just a guess…

In this example they show 0.81.0. Maybe give that a try…

Cloudflare Pages does not detect environment settings in the config file. So I set them on their settings page. I am sure both are identical.

???

Didn’t work either. It instead disables access to the category pages themselves. I asked for their support on Discord but no response. I have posted in the community pages awaiting a response.

Pinging this topic. Still does not work on CF and on Netlify, it returns a 404 error. Locally, it shows a blank white page. Is the error page the desired behaviour?

Share your repository, privately if you wish.

Thanks for the help @jmooring. For anyone else who may come across this, disabling taxonomy should return a 404 error on the live site.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.