Page builds in .47, but errors in .51


I’ve looked online for what change might have done this, but I’m drawing a blank. I rebuilt my workstation and decided to pull the current package from github instead of installing the package distributed in ubuntu’s default repo. When I do so I get the following error for several pages.

Building sites … ERROR 2018/11/24 09:25:18 render of "page" failed: execute of template failed: template: _default/single.html:13:9: executing "_default/single.html" at <partial (printf "%s/...>: error calling partial: "/home/noble/Documents/www/themes/docdock/layouts/partials/original/body-beforecontent.html:2:10": execute of template failed: template: partials/original/body-beforecontent.html:9:9: executing "partials/original/body-beforecontent.html" at <partial "header.html...>: error calling partial: "/home/noble/Documents/www/themes/docdock/layouts/partials/header.html:2:10": execute of template failed: template: partials/header.html:2:10: executing "partials/header.html" at <where .Site.Pages "S...>: error calling where: Source isn't a field of struct type *hugolib.Page

I thought my backup was the problem, but all looked okay so I removed the github package and installed from the repo. Hugo now builds the site without problem. Below is the hugo env output for the repo install.

Hugo Static Site Generator v0.47.1/extended linux/amd64 BuildDate: 2018-09-25T03:41:10Z

I’m sure its something I or the theme I used need to fix, but I’m having zero luck in chasing. Let me know if there’s something else you need.

Hi, could you share your site code? This is hard to troubleshoot otherwise

I don’t have it in a repository. Is there specific piece you want to see?

This is my mistake, I assumed nobody used the embedded Source struct (now removed) as I could not find it mentioned in the docs.

You should look for .Source.Filename or similar and remove .Source.

Yes, this is Source removed. You’ll have more information here :

Do as @bep says or you also can replace “Source” by “.File” too.

Ah, okay. I’ve made a few edits to the them since I downloaded it, so I’ll have to dig through files manually I think.

Thanks for this