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

Default page created for mixed-case taxonomy folders with content file #4238

Closed
nanov opened this Issue Jan 8, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@nanov

nanov commented Jan 8, 2018

An isolated test case can be found here.

When trying to display taxonomy metadata page ( /layout/_default/taxonomy.html ) when the template contains more then one line the ".Params" are not loaded.

In the above example the behaviour can be seen on ( /authors/MaxMustermann ), if another line is added to the template file ( or actually any other content ) nothing is displayed.

As the behaviour is inconsistent I assume it is a bug.

@bep bep added the Bug label Jan 8, 2018

@bep bep self-assigned this Jan 8, 2018

@bep bep added this to the v0.32.3 milestone Jan 8, 2018

@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Jan 8, 2018

Member

I can reproduce it, but that is some curious bug ... Thank for the report; esp. appreciate the repro.

Member

bep commented Jan 8, 2018

I can reproduce it, but that is some curious bug ... Thank for the report; esp. appreciate the repro.

@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Jan 8, 2018

Member

I can also reproduce this for 0.31.1 so this isn't a brand new issue.

Member

bep commented Jan 8, 2018

I can also reproduce this for 0.31.1 so this isn't a brand new issue.

@bep bep changed the title from v0.32.2 Taxonomy metadata not displayed in some circumstances to Default page created for mixed-case taxonomies with content file Jan 8, 2018

@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Jan 8, 2018

Member

OK, I see what happens.

  • We match by path vs taxonomy to determine if we have a content page for that taxonomy
  • The taxonomy name is (if preserveTaxonomyNames is not set) normalized to maxmustermann while you have the disk folder called MaxMustermann.
  • This isn't a new issue, but I suspect most people will just name the folder authors/maxmustermann and it will just work.
  • The inconsistent behaviour you see here is that you will end up with two pages with the same target filename, so it is a little random who will win.

This isn't a regression in Hugo 0.32, but I can see the confusion, and the fix is easy enough, so I will include it in today's release.

Member

bep commented Jan 8, 2018

OK, I see what happens.

  • We match by path vs taxonomy to determine if we have a content page for that taxonomy
  • The taxonomy name is (if preserveTaxonomyNames is not set) normalized to maxmustermann while you have the disk folder called MaxMustermann.
  • This isn't a new issue, but I suspect most people will just name the folder authors/maxmustermann and it will just work.
  • The inconsistent behaviour you see here is that you will end up with two pages with the same target filename, so it is a little random who will win.

This isn't a regression in Hugo 0.32, but I can see the confusion, and the fix is easy enough, so I will include it in today's release.

@bep bep changed the title from Default page created for mixed-case taxonomies with content file to Default page created for mixed-case taxonomy folders with content file Jan 8, 2018

bep added a commit to bep/hugo that referenced this issue Jan 8, 2018

hugolib: Fix handling of mixed-case taxonomy folders with content file
* We match by path vs taxonomy to determine if we have a content page for that taxonomy
* The taxonomy name is (if `preserveTaxonomyNames` is not set) normalized to `maxmustermann` while you have the disk folder called `MaxMustermann`.
* This isn't a new issue, but I suspect most people will just name the folder `authors/maxmustermann` and it will just work.
* The inconsistent behaviour you see here is that you will end up with two pages with the same target filename, so it is a little random who will win.

This fixes that by also normalizing the taxonomy path when doing the comparison.

Fixes gohugoio#4238

@bep bep closed this in #4239 Jan 8, 2018

bep added a commit that referenced this issue Jan 8, 2018

hugolib: Fix handling of mixed-case taxonomy folders with content file
* We match by path vs taxonomy to determine if we have a content page for that taxonomy
* The taxonomy name is (if `preserveTaxonomyNames` is not set) normalized to `maxmustermann` while you have the disk folder called `MaxMustermann`.
* This isn't a new issue, but I suspect most people will just name the folder `authors/maxmustermann` and it will just work.
* The inconsistent behaviour you see here is that you will end up with two pages with the same target filename, so it is a little random who will win.

This fixes that by also normalizing the taxonomy path when doing the comparison.

Fixes #4238
@nanov

This comment has been minimized.

Show comment
Hide comment
@nanov

nanov Jan 9, 2018

Thank you very much for the quick response and even quicker fix!

nanov commented Jan 9, 2018

Thank you very much for the quick response and even quicker fix!

moorereason added a commit to moorereason/hugo that referenced this issue Feb 9, 2018

hugolib: Revert taxonomy test change
Don't mix casing in the "cat1" taxonomy term test because Hugo doesn't
support multiple terms whose lowercase strings collide.

Related to gohugoio#4238

moorereason added a commit to moorereason/hugo that referenced this issue Aug 21, 2018

hugolib: Revert taxonomy test change
Don't mix casing in the "cat1" taxonomy term test because Hugo doesn't
support multiple terms whose lowercase strings collide.

Related to gohugoio#4238
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment