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

RSS Template Errors Preventing Build #141

Closed
nibl opened this issue Nov 2, 2023 · 6 comments
Closed

RSS Template Errors Preventing Build #141

nibl opened this issue Nov 2, 2023 · 6 comments

Comments

@nibl
Copy link

nibl commented Nov 2, 2023

RSS template fails with multiple errors:

... render of "home" failed: ".../themes/hugo-blog-awesome/layouts/_default/rss.xml:22:17": execute of template failed: template: _default/rss.xml:22:17: executing "_default/rss.xml" at : can't evaluate field LanguageCode in type *langs.Language

Hugo gives the same error for render of "taxonomy" and "term". The errors do not occur with version 1.2.0 of the theme, which is the only older version I have tested.

Theme is latest version pulled via git. Hugo is v0.111, the latest available on Ubuntu via Snap.

@the-chronomancer
Copy link

the-chronomancer commented Nov 10, 2023

Same exact issue here on the same Hugo version, but was able to build this by changing this (line 22) in rss.xml:
{{ .Site.Language.LanguageCode }}{{ with .Site.Author.email }}
To this:
{{ .Site.LanguageCode }}{{ with .Site.Author.email }}

It seems the ability to select a language disappears, however.

@hugo-sid
Copy link
Owner

hugo-sid commented Nov 11, 2023

Thanks @nibl, @the-chronomancer & @InSpaceDude for reporting this.

I don't see any error with the latest version of Hugo (v0.120.4). See the screenshot below for more details.

image

Copy link

github-actions bot commented Dec 4, 2023

This issue has been marked stale due to inactivity. It will auto-close in 7 days without an update.

@github-actions github-actions bot added the Stale label Dec 4, 2023
@paddy-exe
Copy link

paddy-exe commented Dec 5, 2023

@hugo-sid I am encountering this issue now as well:
It doesn't appear when building locally but using the hugo action doesn't work anymore to publish the changes

Local

image

GitHub action:

image

Edit: After some more inspections I found an inconsistency that could be the the culprit:

Take a look at the small site whereas everywhere else .Site is used

 <language>{{ site.Language.LanguageCode }}</language>{{ with .Site.Author.email }}
 <language>{{ .Site.LanguageCode }}</language>{{ with .Site.Author.email }}

Never mind... it is still broken because I can't use my own fork for the hugo action -.-

@paddy-exe
Copy link

Alright after a LOOONG look at it again, I solved it now. It doesn't work with the GitHub Action because the action uses an older version of hugo.

@nibl @the-chronomancer Make sure you have hugo set to the latest version:

jobs:
  # Build job
  build:
    runs-on: ubuntu-latest
    env:
      HUGO_VERSION: 0.120.4

I had mine before on HUGO_VERSION: 0.111.2

@github-actions github-actions bot removed the Stale label Dec 5, 2023
@hugo-sid
Copy link
Owner

hugo-sid commented Dec 6, 2023

Make sure you have hugo set to the latest version:

Thanks @paddy-exe for confirming that this issue doesn't exist in Hugo (v0.120.4).

I'm closing this issue for now. Please feel free to reopen/comment if anyone encounters this issue again.

@hugo-sid hugo-sid closed this as completed Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants