error calling Menus: cannot convert <nil> to maps.Params #8825
Milestone
Comments
bep
added a commit
to bep/hugo
that referenced
this issue
Jul 30, 2021
|
I have added #8830 which should remove the error, but even if I think that solution is sound enough (treat nil Params as empty Params), I'm curious as to why ... This is a |
|
Actually I found the culprit... I had left something like this in one of the content files (an empty params key on a menus map): titlte: ...
menus:
main:
parent: journal
weight: 2
params:It did not break under 85 hence me not noticing... |
|
I suspected the above, so I tried to create a failing test for it ... In TOML, but ah, YAML decodes empty maps to nil. How liberating. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Hugo are you using (
hugo version)?Does this issue reproduce with the latest release?
Yes but not on 85.0, might have something to do with cascade in config.
I'm leaving this here, if this message does not speak by itself, I'll try and share more and reproduce the error on a simple project (it's currently happening on a rather complex one).
A simple
{{ with site.Menus }}is currently triggering this.The text was updated successfully, but these errors were encountered: