Upgrading from 0.18.1 to 0.25.1 breaks site

Ok, it’s been a while since I tried to upgrade. 0.18.1 has been doing just fine for me. I’m trying to teach my son how to write blog posts using Hugo and of course “brew install hugo” for him gives him 0.25.1. But when he runs ‘hugo server’ some of the links generated in the archive don’t work.

http://blog.sensr.net/archives/ has a link to

http://localhost:1313/archives/ has a link to

But the site generated by hugo v0.18.1 has this link, the site generated by v0.25.1 doesn’t have this link, resulting in a 404.

I can’t for the life of me figure out how to get brew to install v0.18.1 either. Which would solve my immediate problem.

Any insight into how to fix this issue would be appreciated!


https://sensr.net Watch your stuff! ™

  • As to getting 0.18.1, you can download it at the release page (not sure how brew works in this department)
  • As to what the reason behind your problem: That is impossible to guess with, like, no information. Any error message in the log would help. A link to the projcect source would be good.

Thanks for the quick reply. Here’s the source repo…

There are no errors when running ‘hugo server’ at all. To reproduce the issue, I just clone the repo, run ‘hugo server’ go to http://localhost:1313/archives/ and click on the link for “Como Configurar a Gravação da D-Link DCS-5010L com FTP” which is a link to http://localhost:1313/2014/10/03/como-configurar-a-gravacao-da-d-link-dcs-5010l-com-ftp/ and get a 404 error in my browser.

use the --verbose flag on hugo server to get more info on what is going wrong.

1 Like

Some general tips:

  • Read the Release Notes for every release and pay particular attention to the Notes section. We usually call out breaking changes and deprecated features in the Notes section.

  • If you’re several versions behind, consider updating to the latest minor releases between 0.18 and 0.25. So, build with 0.19, then 0.20.7, and so on. We will sometimes log warnings for a couple minor releases on deprecated features before we remove those features (and the warnings). You may find clues along the way that will help you upgrade your site.

Using verbose mode, it looks like layout: post is breaking things. Remove that, and it starts working for me.

WARN 2017/07/25 22:03:16 [en] Unable to locate layout for "page": [post/post.html.html post/post.html _default/post.html.html _default/post.html theme/post/post.html.html theme/post/post
.html theme/_default/post.html.html theme/_default/post.html]
1 Like