Wowchemy-hugo-modules: Troubleshooting migration issues

Created on 20 Apr 2019  Â·  4Comments  Â·  Source: wowchemy/wowchemy-hugo-modules

Hi all,
apologies if this is a dumb question, but I am not yet a hugo or academic expert.

Last year I was able to create a beautiful website using hugo: http://climdyn.usc.edu

I tried to update it recently, and found that I had to upgrade to Hugo v0.55 and the latest Academic version (4.2.5). When I run update_academic.sh and preview the build of my original site using hugo server, I now get a blank page containing only the title and the headers, but linking to no content. Obviously a few things broke since last year, and I don't know where to start with the release notes to figure out what needs to be changed.

So I tried to fork the repo anew and build content from scratch. I was able to create a publication, which showed OK on the server up until the point where I linked it to a project (specifically, I replaced projects = [] by projects = ["stats"]). Creating a new stats project via hugo new --kind project project/stats.md worked w/o complaints, but once I ran the hugo server after this creation, it crashed loudly with the message below.

I can't decode this, but hopefully someone can tell me what I did wrong? I thought I was playing by the rules, for once...

Also, is there a way for me to update my website without having to manually re-create every page? I guess it depends on the nature of the bug.

Thanks for any and all help on this.

Building sites … WARN 2019/04/19 15:38:22 Page's .Hugo is deprecated and will be removed in a future release. Use the global hugo function.
WARN 2019/04/19 15:38:22 Page's .RSSLink is deprecated and will be removed in a future release. Use the Output Format's link, e.g. something like:
{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}.
ERROR 2019/04/19 15:38:22 render of "page" failed: "/Users/julieneg/Sites/usc2019/themes/academic/layouts/project/single.html:34:12": execute of template failed: template: project/single.html:44:15: executing "project/single.html" at html:15:8: executing "partials/publication_li_mla.html" at html:34:12": execute of template failed: template: partials/publication_links.html:34:12: executing "partials/publication_links.html" at <$.Site.GetPage>: error calling GetPage: too many arguments to .Site.GetPage: [page project stats]. Use lookups on the form {{ .Site.GetPage "/posts/mypage-md" }}
ERROR 2019/04/19 15:38:22 render of "section" failed: "/Users/julieneg/Sites/usc2019/themes/academic/layouts/section/publication.html:34:12": execute of template failed: template: section/publication.html:61:15: executing "section/publication.html" at html:15:8: executing "partials/publication_li_mla.html" at html:34:12": execute of template failed: template: partials/publication_links.html:34:12: executing "partials/publication_links.html" at <$.Site.GetPage>: error calling GetPage: too many arguments to .Site.GetPage: [page project stats]. Use lookups on the form {{ .Site.GetPage "/posts/mypage-md" }}
ERROR 2019/04/19 15:38:22 render of "home" failed: execute of template failed: template: index.html:1:3: executing "index.html" at html:23:9: executing "partials/widget_page.html" at : error calling partial: "/Users/julieneg/Sites/usc2019/themes/academic/layouts/partials/widgets/publications.html:34:12": execute of template failed: template: partials/widgets/publications.html:39:11: executing "partials/widgets/publications.html" at html:15:8: executing "partials/publication_li_mla.html" at html:34:12": execute of template failed: template: partials/publication_links.html:34:12: executing "partials/publication_links.html" at <$.Site.GetPage>: error calling GetPage: too many arguments to .Site.GetPage: [page project stats]. Use lookups on the form {{ .Site.GetPage "/posts/mypage-md" }}
Total in 28 ms
Error: Error building site: failed to render pages: render of "page" failed: "/Users/julieneg/Sites/usc2019/themes/academic/layouts/publication/single.html:34:12": execute of template failed: template: publication/single.html:82:15: executing "publication/single.html" at html:34:12": execute of template failed: template: partials/publication_links.html:34:12: executing "partials/publication_links.html" at <$.Site.GetPage>: error calling GetPage: too many arguments to .Site.GetPage: [page project stats]. Use lookups on the form {{ .Site.GetPage "/posts/mypage-md" }}

Most helpful comment

The amount of breaking changes for each release makes it really difficult for casual users to keep one's site updated.

After going through the same ordeal today (it was faster to migrate from v3.3.1 to v4.2.5 by restarting the website from a fresh clone...), I wanted to start a discussion on that topic to see what could be done to make upgrades less painful. But here is not the place for such a discussion I agree.

@gcushen you mention a forum, is it the general hugo forum or is there a better place for discussions specifically related to hugo-academic?

All 4 comments

The above errors imply that all the steps in the Update Guide were not followed, especially the steps to migrate your config and content to the latest version. If you made any modifications/overrides directly to Academic's files, you may need to remove them. Refer to the Update Guide at https://sourcethemes.com/academic/docs/update/ . For support requests, consider posting on the forums. These issues are for bug reports and feature requests.

The amount of breaking changes for each release makes it really difficult for casual users to keep one's site updated.

After going through the same ordeal today (it was faster to migrate from v3.3.1 to v4.2.5 by restarting the website from a fresh clone...), I wanted to start a discussion on that topic to see what could be done to make upgrades less painful. But here is not the place for such a discussion I agree.

@gcushen you mention a forum, is it the general hugo forum or is there a better place for discussions specifically related to hugo-academic?

Thanks for the support, @zertrin.

The amount of breaking changes for each release makes it really difficult for casual users to keep one's site updated.

My thoughts exactly. I updated a little casually, and now have no way to go back and figure out which version was the working one. And yes, if they are to be the first place to look for troubleshooting, the forums are not as easy to find as they should be. Guidance appreciated, @gcushen .

RE what would it take to have an easier upgrade process for migrating content and config to new theme versions or new versions of Hugo, this falls in the realm of the Hugo team - there is not much more we can do this side. Currently, Hugo lacks dependency management and lacks any form of migration framework for upgrading a site to be compatible with new versions of Hugo or Hugo themes. The Django CMS supports automating migration, so why not add something similar in Hugo for themes/sites? Feel free to add your Hugo feedback on the Hugo forums/GitHub.

The fact that the release of Hugo v0.55 broke all Hugo sites or at least produced deprecation warnings on them, for those who updated Hugo, highlights the need for at least proper dependency management in Hugo. For example, currently we cannot set a specific or maximum version of Hugo for which Academic is compatible with, we can only set a minimum version of Hugo required. Thus, when Hugo team make a release with breaking changes, it breaks sites of those who updated their Hugo.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

HughP picture HughP  Â·  4Comments

brianguay picture brianguay  Â·  4Comments

jooyoungseo picture jooyoungseo  Â·  3Comments

netw0rkf10w picture netw0rkf10w  Â·  4Comments

melvidoni picture melvidoni  Â·  3Comments