How can I address error messages after upgrading to .15?

After upgrading to .15, and building the site, I get the error messages below, and my site no longer builds correctly .

I thought I understood from documentation that the problem was that BaseUrl needed to be replaced with BaseURL in the all the files that are inside /layouts/partials/, but that does not seem to help.

I also tried to address this problem by cloning all the themes into my site, and that didn’t help.

I am not sure how to get started fixing this problem. Perhaps I created a new problem by replacing Url with URL in the documents? Should I try to reinstall clean copies of some files? Thank you!

$ hugo -d dist

ERROR: 2015/12/30 template: partials/sidebar.html:30:61: executing "partials/sidebar.html" at <.Site.BaseUrl>: BaseUrl is not a field of struct type *hugolib.SiteInfo in partials/sidebar.html
ERROR: 2015/12/30 template: partials/sidebar.html:30:61: executing "partials/sidebar.html" at <.Site.BaseUrl>: BaseUrl is not a field of struct type *hugolib.SiteInfo in partials/sidebar.html
ERROR: 2015/12/30 template: partials/sidebar.html:30:61: executing "partials/sidebar.html" at <.Site.BaseUrl>: BaseUrl is not a field of struct type *hugolib.SiteInfo in partials/sidebar.html
ERROR: 2015/12/30 template: partials/sidebar.html:30:61: executing "partials/sidebar.html" at <.Site.BaseUrl>: BaseUrl is not a field of struct type *hugolib.SiteInfo in partials/sidebar.html
ERROR: 2015/12/30 template: partials/sidebar.html:30:61: executing "partials/sidebar.html" at <.Site.BaseUrl>: BaseUrl is not a field of struct type *hugolib.SiteInfo in partials/sidebar.html
ERROR: 2015/12/30 template: partials/sidebar.html:30:61: executing "partials/sidebar.html" at <.Site.BaseUrl>: BaseUrl is not a field of struct type *hugolib.SiteInfo in partials/sidebar.html
ERROR: 2015/12/30 template: partials/sidebar.html:30:61: executing "partials/sidebar.html" at <.Site.BaseUrl>: BaseUrl is not a field of struct type *hugolib.SiteInfo in partials/sidebar.html
ERROR: 2015/12/30 template: partials/sidebar.html:30:61: executing "partials/sidebar.html" at <.Site.BaseUrl>: BaseUrl is not a field of struct type *hugolib.SiteInfo in partials/sidebar.html
0 draft content
0 future content
3 pages created
1 paginator pages created
2 categories created
in 68 ms

Yes, that should fix it, but if you use a theme, you will have to make sure that the theme is updated too. I believe all (or almost all) the themes are up-to-date in this area.

1 Like

Sorry, but then shouldn’t I be in the clear after deleting /themes/ and recreating it with git clone --recursive https://github.com/spf13/hugoThemes.git themes? I’ve been using theme hyde-x and also tried substituting in hyde-y in config.toml, and they’ve both been updated recently.

You should be. You can confirm by running something like

$ find . -type f -name '*.html' | xargs grep BaseUrl

That’ll tell you if any files were missed.

1 Like

Thank you — that search yielded one instance of “BaseUrl” that was inside a comment, so I thought it wasn’t going to cause trouble, but it wasn’t until I removed that that everything worked.

1 Like