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

Terms with backing content file is not handled correctly in 0.123 #12020

Closed
TiGR opened this issue Feb 9, 2024 · 4 comments · Fixed by #12025
Closed

Terms with backing content file is not handled correctly in 0.123 #12020

TiGR opened this issue Feb 9, 2024 · 4 comments · Fixed by #12025
Assignees
Milestone

Comments

@TiGR
Copy link

TiGR commented Feb 9, 2024

Example site. I try to list taxonomy terms, according to the docs (it is not changed for 0.123) I can do it like this:

<ul>
  {{ range .Site.Taxonomies.tags }}
    <li><a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> {{ .Count }}</li>
  {{ end }}
</ul>

With the example site, when I run it in 0.122, I get this result in the console:

WARN  Listing tags:
WARN  --------------------
WARN  Tag "tag1" "Tag One"
WARN  Tag "tag2" "Tag Two"
WARN  Tag "tag3" "Tag Three"
WARN  
WARN  Listing tags in alphabetical order:
WARN  -----------------------------------
WARN  Tag "Tag One"
WARN  Tag "Tag Three"
WARN  Tag "Tag Two"

But when I run it with 0.123, I get this:

WARN  Listing tags:
WARN  --------------------
WARN  Tag "tag1" "Tag One"
WARN  
WARN  Listing tags in alphabetical order:
WARN  -----------------------------------
WARN  Tag "Tag One"
@TiGR TiGR changed the title Unable to list taxonomies in 0.123 Unable to list taxonomy terms in 0.123 Feb 9, 2024
@bep bep added v0.123-DEV and removed NeedsTriage labels Feb 9, 2024
@bep bep self-assigned this Feb 9, 2024
@bep bep added this to the v0.123.0 milestone Feb 9, 2024
@bep bep changed the title Unable to list taxonomy terms in 0.123 Terms with backing content file is not handled correctly in 0.123 Feb 9, 2024
@bep
Copy link
Member

bep commented Feb 9, 2024

Thanks for this. I will fix this during the weekend.

@jmooring
Copy link
Member

jmooring commented Feb 9, 2024

Additional findings...

  1. Ranging over an ordered taxonomy (e.g., site.Taxonomies.tags.ByCount) has the same problem
  2. Ranging over .Page.GetTerms works as expected

@bep
Copy link
Member

bep commented Feb 9, 2024

Yea, I have spotted the obvious mistake.

bep added a commit to bep/hugo that referenced this issue Feb 10, 2024
bep added a commit to bep/hugo that referenced this issue Feb 10, 2024
bep added a commit to bep/hugo that referenced this issue Feb 10, 2024
bep added a commit that referenced this issue Feb 10, 2024
Copy link

github-actions bot commented Mar 3, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants