ERROR: 2015/10/27 Error while rendering taxonomy terms for category: reflect: call of reflect.Value.Type on zero Value
I figured this was an error with my taxonomy template, but I cannot find any issues with it:
Any ideas what I’ve missed?
ERROR: 2015/10/27 Error while rendering taxonomy terms for category: reflect: call of reflect.Value.Type on zero Value
I figured this was an error with my taxonomy template, but I cannot find any issues with it:
Any ideas what I’ve missed?
If I had to guess I would think it’s this line…
{{ if eq .Name $first_section }}
If $first_section or .Name are zero values it may cause this. This is
a total guess though.
I found the issue: I thought it was in my taxonomy/category.html
template, but I had an unused (and broken) _default/terms.html
template that I was able to remove.
Relatedly, to debug this I added some TRACE debug code in renderThing
to hugo locally and changed the default jww
level to levelTrace
, and was able then determine the actual failing template. I would recommend a small change to hugo:
--verbose_level
flag that takes a level name (‘debug’, ‘DEBUG’, ‘info’, ‘TRACE’, etc.)renderThing
so that template errors can be more cleanly caught.Thanks!
–Steve