Render of "section" failed -- cannot find the template that has the error

Since upgrading from 0.111 to 0.120 I’m getting this error

ERROR render of "section" failed: template: _internal/_default/rss.xml:3:9: executing "_internal/_default/rss.xml" at <site>: can't evaluate field email in type string
ERROR render of "term" failed: template: _internal/_default/rss.xml:3:9: executing "_internal/_default/rss.xml" at <site>: can't evaluate field email in type string
ERROR render of "taxonomy" failed: template: _internal/_default/rss.xml:3:9: executing "_internal/_default/rss.xml" at <site>: can't evaluate field email in type string
Built in 170 ms
Error: error building site: render: failed to render pages: render of "section" failed: template: _internal/_default/rss.xml:3:9: executing "_internal/_default/rss.xml" at <site>: can't evaluate field email in type string

but I don’t know where to find _internal/_default/rss.xml to see where the problem lies. I’ve installed hugo via macos homebrew.

Yeah, I broke this. Sorry about the hassle. I think you have a configuration that I (naively) was not expecting.

Please confirm that you have something like this in your site configuration:

[params]
author = 'jdoe'

Are you using a theme, if so which one?

I do not have an [author] section, just an author declaration under [params]. I’m using the learn theme (GitHub - matcornic/hugo-theme-learn: Porting Grav Learn theme to Hugo).

Does the value of the author field appear anywhere on your site?

It does, the learn theme has it in a partial, and through that it appears as <meta name="author" content="my name"> on every page.

So, that theme is no longer maintained.

Two options…

  1. Comment out the author param in your site configuration. It won’t appear in the meta tag, but that’s not a factor in search engine optimization.

  2. Override themes/hugo-theme-learn/layouts/partials/meta.html:

mkdir -p layouts/partials
cp themes/hugo-theme-learn/layouts/partials/meta.html layouts/partials

Then change this:

.Site.Params.author

to

site.Params.author.name

And in your site configuration do this:

[params.author]
name = 'jdoe'               # optional
email = 'jdoe@example.org'  # optional

Again, sorry for the trouble.

3 Likes

Fantastic – no trouble, I appreciate the help! Is there a learn derivative that is still in maintenance? learn had a few features I really appreciated.

Maybe. I looked through the theme’s issue queue to see if anyone has mentioned an alternative; no luck.

You could create a new issue, asking the same question. I’m sure others have transitioned to other themes. It’s unfortunate that is no longer maintained.

1 Like

Just found this:
https://github.com/McShelby/hugo-theme-relearn

1 Like

I’m going to give that a go, thanks!

And the author has already made the changes to avoid breakage. It looks very well maintained.

1 Like

The theme author is @McShelby.

1 Like

Just to note I installed the Ananke theme as per the quickstart and hit the same issue.

Commenting out the Author in the [params] section allowed the site to build.

author is kind of a reserved keyword or something? And any other keywords, we should avoid?

Thanks

Found the details in Release v0.120.0 · gohugoio/hugo · GitHub.
Thanks

For information : same with Ananke theme https://github.com/theNewDynamic/gohugo-theme-ananke/tree/master/layouts/partials , change in layout/_default/single to do as here described.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.