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

.AllTranslations includes current language in List with 0.123.0 and above #12207

Closed
adityatelange opened this issue Mar 6, 2024 · 3 comments
Closed

Comments

@adityatelange
Copy link

adityatelange commented Mar 6, 2024

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

$ hugo version
v0.123.7-312735366b20d64bd61bff8627f593749f86c964

Does this issue reproduce with the latest release?

Yes.


Steps to reproduce:

  1. Clone exampleSite branch of https://github.com/adityatelange/hugo-PaperMod
  2. Remove Languages section so that we build only a single language https://github.com/adityatelange/hugo-PaperMod/blob/4bdc993b98cc82d1c59efca0774f85811b0bf213/config.yml#L22-L103
  3. Build with hugo 0.122.x and 0.123.x
  4. Observe that the site.Home.AllTranslations returns 0 pages on 0.122.x and before and returns 1 on 0.123.x

2024-03-06_21-43
2024-03-06_21-44

PaperMod reference: adityatelange/hugo-PaperMod#1449

@jmooring
Copy link
Member

jmooring commented Mar 6, 2024

I haven't dug into the details here, but as described this sounds like we fixed something that was broken in v0.122.0.

https://gohugo.io/methods/page/alltranslations/

Returns all translations of the given page, including the current language.

https://gohugo.io/methods/page/translations/

Returns all translations of the given page, excluding the current language.

@adityatelange
Copy link
Author

I haven't dug into the details here, but as described this sounds like we fixed something that was broken in v0.122.0.

https://gohugo.io/methods/page/alltranslations/

Returns all translations of the given page, including the current language.

https://gohugo.io/methods/page/translations/

Returns all translations of the given page, excluding the current language.

I briefly went through all release notes but couldn't find anything.

Thanks for the quick response, .Translations works for the particular use case. Closing.

Copy link

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 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants