Hugo: Error: Error building site: failed to render pages

Hi! I recently switched themes from mnml to Mythos, and I’ve gotten this error several times. I was on Hugo 0.158, and switched back down to 0.91 thinking that might help, but I’m still seeing the error. I also attempted to customize the Mythos theme following posted instructions, but I don’t speak css, so I don’t know what I’m really doing there. Somewhere in dong all that tinkering, I think I might’ve messed up something. I’m at wireddifferently.micro.blog

Any ideas what I’ve done that I shouldn’t have, and what I should do to fix it?

Hugo: Error: Error building site: failed to render pages: render of “home” failed: execute of template failed: template: index.html:5:5: executing “index.html” at <partial “header.html” .>: error calling partial: execute of template failed: template: partials/header.html:1:3: executing “partials/header.html” at <partial “navigation.html” .>: error calling partial: “/var/cache/snippets/wireddifferently-preview_515bdb/layouts/partials/navigation.html:36:23”: execute of template failed: template: partials/navigation.html:36:23: executing “partials/navigation.html” at <where .Site.Menus.main “Name” “Archive”>: error calling where: can’t iterate over

Sorry about this error. I think I’ve tracked it down. Basically when using the preview feature, Micro.blog only copies some files so that the preview is good enough to show the home page, and so if a theme assumes all files are there it can break.

I’m making a change today that I think will address this. If you are seeing any new posts not get published to your blog, let us know.

Also feel free to post CSS questions here too! Someone may be able to help.

Thank you, sir! I’m still seeing “Error publishing your blog: Hugo can’t build because `where .Site.Menus.main “Name” “Archive”` tries to loop over a missing (`nil`) menu.” I feel like I might’ve deleted or inactivated pages I shouldn’t have…?

P.S. It’s not possible to change my username on here since it’s Discourse, right? :slight_smile:

Wait a sec - I think I had to “clear errors” for it to stop showing up. I think that worked. I’ll check later today :slight_smile:

Hi, Manton. I think it’s still happening.

Are you trying to use a plug in or did you use a plug in to show “related content”? This is definitely plug in/template related.

Yeah, @jsonbecker’s right, at this point if it’s not leftover old files it has to be something in a plug-in or edited template that is referencing a partial no longer there. I’ve been thinking about adding some kind of “debug template error” button that goes through all the templates to track this kind of error down.

(By the way, I think I can rename your username in Discourse so it matches the Micro.blog change. I’ll check that.)