What version of Hugo are you using (hugo version)?
$ Hugo version Hugo v0.161.1
Does this issue reproduce with the latest release?
Yes.
Encountered this yesterday, and it took a while to isolate (I’m a Hugo newbie).
Description
A typo in a partial call’s argument dict (an incorrect key name) produced no error and no visible output change during a live hugo server session, despite the partial depending on that key to render content and no error was reported.
The error only surfaced as a build error after server restart, and only then because an unrelated path change triggered a hunt for why nested partials weren’t being included. Deleting public/ and rebuilding during the session didn’t clear the cached result.
Expected behaviour:
A key name mismatch between the dict passed to a partial and the keys the partial reads should throw a build error or warning of some sort.
Actual behaviour:
Hugo continued serving the previously-cached (correct) output for the partial, entirely masking the error. The session ran across approx 30 commits without any indication that the partial was not being re-evaluated.
Steps to reproduce:
- Start
hugo server with a working partial at layouts/_partials/exhibitions-current.html, called from home.html as partial "exhibitions-current.html"
- While server running, move partial to
layouts/_partials/base/exhibitions-current.html without updating the call in home.html
- Hugo continues serving the correct output despite the partial now being unreachable at the original path
- In the same session, introduce a key name mismatch in the dict passed to a nested component partial, e.g. pass
"exhibitionss" where the component reads .exhibitions
- Hugo carries on serving the correct output without giving an error or warning
- Restart the server. Hugo now errors on the broken path from step 2. Once this is corrected, the key mismatch from step 4 silently produces empty output.
What version of Hugo are you using (
hugo version)?Does this issue reproduce with the latest release?
Yes.
Encountered this yesterday, and it took a while to isolate (I’m a Hugo newbie).
Description
A typo in a partial call’s argument dict (an incorrect key name) produced no error and no visible output change during a live
hugo serversession, despite the partial depending on that key to render content and no error was reported.The error only surfaced as a build error after server restart, and only then because an unrelated path change triggered a hunt for why nested partials weren’t being included. Deleting
public/and rebuilding during the session didn’t clear the cached result.Expected behaviour:
A key name mismatch between the dict passed to a partial and the keys the partial reads should throw a build error or warning of some sort.
Actual behaviour:
Hugo continued serving the previously-cached (correct) output for the partial, entirely masking the error. The session ran across approx 30 commits without any indication that the partial was not being re-evaluated.
Steps to reproduce:
hugo serverwith a working partial atlayouts/_partials/exhibitions-current.html, called fromhome.htmlaspartial "exhibitions-current.html"layouts/_partials/base/exhibitions-current.htmlwithout updating the call inhome.html"exhibitionss"where the component reads.exhibitions