Skip to content

Terms are not correctly collected when disablePathToLower set to true with custom _index.md #10630

@cmpute

Description

@cmpute

What version of Hugo are you using (hugo version)?

$ hugo version
hugo v0.109.0-47b12b83e636224e5e601813ff3e6790c191e371+extended linux/amd64 BuildDate=2022-12-23T10:38:11Z VendorInfo=gohugoio

Does this issue reproduce with the latest release?

Haven't tried but I believe so.

Description

The taxonomy terms are not correctly associated with the taxonomy page if disablePathToLower is true. This problem can be reproduced using the exampleSite of the theme stack.

Under the default settings, the posts of category Test are correctly attached to the test page (/categories/test).
image

However, if disablePathToLower is set to True, then the path of the category page becomes /categories/Test and this page contains no actual posts.
image

So in summary, I guess the disablePathToLower option messed up the collection process of taxonomies.

#4183 might be related. And I'm aware of #9171.

I use this option because of historical considerations, I don't want to mess up the SEO of my website. I believe I have to migrate to all-lower-case URL path, because this issue is critical, and it might not be fixed soon due to #9171.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions