Wowchemy site stopped working (Academic theme)

The issue I am facing is very similar to a recent post (Wowchemy site stopped working), however the solution provided by @alcarazr which suggests updating Hugo Blox/Wowchemy installation through config.yaml and go.mod did not fix my problem.

The Wowchemy site I have (git repo) is based on an old Academic theme, which I have customized. I am now trying to build the website after several months of inactivity, and am running in the following errors:

$ hugo server
hugo: downloading modules …
hugo: collected modules in 31204 ms
Watching for changes in /home/balam/{.cache,Documents}
Watching for config changes in /home/balam/Documents/PROJECTS/repos/svalade.github.io_source/config/_default, /home/balam/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/!hugo!blox/hugo-blox-builder/modules/blox-plugin-reveal@v1.1.3-0.20240513194541-c2e9a799f797/config.yaml, /home/balam/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/!hugo!blox/hugo-blox-builder/modules/blox-bootstrap/v5@v5.9.8-0.20240513194541-c2e9a799f797/hugo.yaml, /home/balam/Documents/PROJECTS/repos/svalade.github.io_source/go.mod
Start building sites … 
hugo v0.127.0-74e0f3bd63c51f3c7a0f07a7c779eec9e922957e+extended linux/amd64 BuildDate=2024-06-05T10:27:59Z VendorInfo=snap:0.127.0

WARN  deprecated: .Site.GoogleAnalytics was deprecated in Hugo v0.120.0 and will be removed in a future release. Use .Site.Config.Services.GoogleAnalytics.ID instead.
ERROR render of "section" failed: "/home/balam/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.9.0/layouts/_default/baseof.html:11:403": execute of template failed: template: _default/list.html:11:403: executing "_default/list.html" at <.File.UniqueID>: can't evaluate field File in type *source.File
ERROR render of "section" failed: "/home/balam/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.9.0/layouts/_default/baseof.html:11:403": execute of template failed: template: section/post.html:11:403: executing "section/post.html" at <.File.UniqueID>: can't evaluate field File in type *source.File
ERROR render of "page" failed: "/home/balam/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.9.0/layouts/_default/baseof.html:11:403": execute of template failed: template: _default/single.html:11:403: executing "_default/single.html" at <.File.UniqueID>: can't evaluate field File in type *source.File
Built in 1139 ms
Error: error copying static files: open /home/balam/Documents/PROJECTS/repos/svalade.github.io_source/public/webfonts/fa-brands-400.ttf: permission denied

Any suggestion on how to proceed would be greatly appreciated!

1 Like

You are more likely to receive an accurate and timely response from the Academic/Wowchemy/Hugo Blox team:
https://github.com/HugoBlox/hugo-blox-builder/discussions

They also have an active Discord channel:
https://discord.com/invite/z8wNYzb

I’m pretty sure you haven’t updated your Hugo Blox installation correctly. You probably have overriden some partials and have not propagated the necessary changes

Thanks for the suggestions!

It seems a lot has happened since I first setup my website, and I’m pretty sure Hugo Blox was not around at that time. So if auto Hugo updates did not take in charge the Hugo Blox installation, and if the go.mod file does not install such dependency correctly, than it’s likely I do not have a correct Hugo Blox installation.

I will need to wrap my head around how to upgrade the installation … Haven’t found any clear instructions on that yet (as recently discussed in a Hugo Blox Discussions post).

1 Like

I’ve followed the Discord thread, which discusses how to update a site based on the Academic CV template from Wowchemy Modules to Hugo Blox. Unfortunately I’ve tried the steps suggested by Geo but I can’t seem to find a way to get the website to build again.

I’m pretty sure that I have the extended version of Hugo installed (installed using snap on an Ubuntu system in Feb-2023):

$ hugo version
hugo v0.128.0-e6d2712ee062321dc2fc49e963597dd5a6157660+extended linux/amd64 BuildDate=2024-06-25T16:15:48Z VendorInfo=snap:0.128.0

As for the installation of Hugo Blox, my understanding is that the updates to the go.mod and config.yaml suggested by @alcarazr (post Wowchemy site stopped working ) should handle that.

My website (see git repo) has a few customizations, in particular in the layouts/partials/blocks and views. Perhaps as @alcarazr is suggesting, this is impeding to propagate the necessary changes?

In any case I’m stuck, and confused as to how to proceed. Starting from scratch means adapting the old Bootstrap-styled template version (Wowchemy) to the new Tailwind-styled (Hugo Blox), and seems like a lot of effort, which I would undergo only if it was highly recommended.

Any suggestion would be greatly appreciated!

You haven’t pushed your changes to move from Wowchemy to Hugo Blox, have you? If you do so, and update to the latest Hugo Blox version, please share here the error message you get when trying to build your site. I’d temporally remove the custom blocks you have and once your site is building fine again, try to apply those customizations again (using the appropriate versions of the files)

Thanks for your reply @alcarazr! No I haven’t pushed any of the attempts of switching from Wowchemy to Hugo Blox to the git repo yet. I’ll do so, and also try removing the custom blocks prior to rebuilding the website. I’ll post here the error messages in case that fails, thanks!

1 Like

@alcarazr sorry for bugging again. I now urgently need to update my website, and I’m still completely stuck trying to get it to build again. In a desperate attempt, I’ve also tried to set up a new website from scratch using the new Tailwind-styled (Hugo Blox) templates, but it’s a mammoth task to reproduce the Wowchemy-based website I have, so I’m back trying to fix it.

As you had kindly suggested, I’ve pushed the edits I made to the config.yaml and go.mod files (as you had suggested in this post) to the website git repo .

Some additional info:

  • Hugo version running:
$ hugo version
hugo v0.134.1-2f89169baa87a9db47e288b60705f4e99e21a945+extended linux/amd64 BuildDate=2024-09-05T10:17:50Z VendorInfo=snap:0.134.1
  • Updated hugo dependencies with:
    $ hugo mod get -u

  • I’ve commented out sections of the content/_index.md which are relying on customized blocks and views, but building still fails with the following errors:

$ hugo server

WARN deprecated: site config key paginate was deprecated in Hugo v0.128.0 and will be removed in a future release. Use pagination.pagerSize instead.
Watching for changes in /home/balam/{.cache,Documents}
Watching for config changes in /home/balam/Documents/PROJECTS/repos/svalade.github.io_source_oldfix/config/_default, /home/balam/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/!hugo!blox/hugo-blox-builder/modules/blox-plugin-reveal@v1.1.3-0.20240901230003-ec9127eaf80b/config.yaml, /home/balam/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/!hugo!blox/hugo-blox-builder/modules/blox-bootstrap/v5@v5.9.8-0.20240901230003-ec9127eaf80b/hugo.yaml, /home/balam/Documents/PROJECTS/repos/svalade.github.io_source_oldfix/go.mod
Start building sites …
hugo v0.134.1-2f89169baa87a9db47e288b60705f4e99e21a945+extended linux/amd64 BuildDate=2024-09-05T10:17:50Z VendorInfo=snap:0.134.1
ERROR deprecated: .Site.GoogleAnalytics was deprecated in Hugo v0.120.0 and will be removed in Hugo 0.135.0. Use .Site.Config.Services.GoogleAnalytics.ID instead.
WARN deprecated: data.GetCSV was deprecated in Hugo v0.123.0 and will be removed in a future release. use resources.Get or resources.GetRemote with transform.Unmarshal.
ERROR render of "section" failed: "/home/balam/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.9.0/layouts/_default/baseof.html:11:403": execute of template failed: template: _default/list.html:11:403: executing "_default/list.html" at <.File.UniqueID>: can't evaluate field File in type *source.File
ERROR render of "section" failed: "/home/balam/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.9.0/layouts/_default/baseof.html:11:403": execute of template failed: template: section/post.html:11:403: executing "section/post.html" at <.File.UniqueID>: can't evaluate field File in type *source.File
ERROR render of "page" failed: "/home/balam/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.9.0/layouts/_default/baseof.html:11:403": execute of template failed: template: _default/single.html:11:403: executing "_default/single.html" at <.File.UniqueID>: can't evaluate field File in type *source.File
Built in 1638 ms
Error: error copying static files: open /home/balam/Documents/PROJECTS/repos/svalade.github.io_source_oldfix/public/webfonts/fa-brands-400.ttf: permission denied

Any help on how to proceed would be greatly appreciated!

You’re importing both old Wowchemy and new Hugo Blox modules. Remove the former and try again.

Thanks for your feedback @alcarazr, good point!

I’ve now fixed the config.yaml and go.mod. The error is now the following:

$ hugo server
WARN deprecated: site config key paginate was deprecated in Hugo v0.128.0 and will be removed in a future release. Use pagination.pagerSize instead.
Watching for changes in /home/balam/{.cache,Documents}
Watching for config changes in /home/balam/Documents/PROJECTS/repos/svalade.github.io_source/config/_default, /home/balam/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/!hugo!blox/hugo-blox-builder/modules/blox-plugin-reveal@v1.1.3-0.20240513194541-c2e9a799f797/config.yaml, /home/balam/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/!hugo!blox/hugo-blox-builder/modules/blox-bootstrap/v5@v5.9.8-0.20240513194541-c2e9a799f797/hugo.yaml, /home/balam/Documents/PROJECTS/repos/svalade.github.io_source/go.mod
Start building sites …
hugo v0.134.1-2f89169baa87a9db47e288b60705f4e99e21a945+extended linux/amd64 BuildDate=2024-09-05T10:17:50Z VendorInfo=snap:0.134.1

ERROR Failed to resolve output formats: OutputFormat with key “wowchemycms_config” not found
ERROR deprecated: .Site.GoogleAnalytics was deprecated in Hugo v0.120.0 and will be removed in Hugo 0.135.0. Use .Site.Config.Services.GoogleAnalytics.ID instead.
Built in 1440 ms
Error: error copying static files: open /home/balam/Documents/PROJECTS/repos/svalade.github.io_source/public/webfonts/fa-brands-400.ttf: permission denied

Update your Hugo Blox installation to the latest version.

Thanks @alcarazr, I suppose updating the Hugo Blox installation is done with $ hugo mod get -u ?

$ hugo mod get -u
WARN  deprecated: site config key paginate was deprecated in Hugo v0.128.0 and will be removed in a future release. Use pagination.pagerSize instead.
go: upgraded github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-reveal v1.1.3-0.20240513194541-c2e9a799f797 => v1.1.3-0.20240908170534-4f621dfa3a5a
go: upgraded github.com/HugoBlox/hugo-blox-builder/modules/blox-bootstrap/v5 v5.9.8-0.20240513194541-c2e9a799f797 => v5.9.8-0.20240908170534-4f621dfa3a5a

After running the command the go.mod file was automatically updated as follows:

module github.com/wowchemy/starter-hugo-academic

go 1.19

require (
github.com/HugoBlox/hugo-blox-builder/modules/blox-bootstrap/v5 v5.9.8-0.20240908170534-4f621dfa3a5a
github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-netlify v1.1.2-0.20240513194541-c2e9a799f797
github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-reveal v1.1.3-0.20240908170534-4f621dfa3a5a
)

require (
github.com/HugoBlox/hugo-blox-builder/modules/blox-core v0.3.1 // indirect
github.com/HugoBlox/hugo-blox-builder/modules/blox-seo v0.2.2 // indirect
)

Unfortunately despite these updates running $ hugo server still fails with the same error …

Try this one just to make sure:

hugo mod get -u ./...

Thanks for your suggestion @alcarazr

I’ve just the command, but sadly $ hugo server still fails with the same error …

May help

  • hugo mod clean

  • hugo mod tidy

  • If you only have generated stuff in public and resources

    delete the public and resources folder

  • use hugo server --gc --cleanDestinationDir

1 Like

After removing this folder I’m able to build your website using Hugo v0.133.1.

1 Like

This is just a comment from the sidelines. Ignore me if I sound crazy. The above DOES NOT come into life without manual intervention or copy/paste “schlamassel”. Go will not create TWO require lists in go.mod.

In my experience, this looks like a messed up module situation. If you did not already did this please do the following sequence without anything in between (when an error comes up stop and let me know the full error (from your command until the CLI stops output)):

(from the posts before I assume you are on a linux with the snap installation of hugo, using a bash terminal. if any of these are different, let’s re-consider)

  • put everything changed and not committed into stash: git stash. (you can later get those changes back with git stash pop)
  • when you run git status there are no uncommited changes, no staged changes, no untracked files.
  • if you still have stuff coming up in git status, remove it, make a backup. but remove it.
  • stop all hugo servers; do not run hugo in between any of the following steps.
  • depending on your system (linux? killall -9 hugo, maybe even with sudo)
  • rm -rf ~/.cache/hugo_cache - delete hugo module cache
  • rm -rf public (maybe even with sudo again) - delete whatever hugo has saved in public
  • rm -rf resources (even remove anything hugo did pre-process (styles/scripts/images))
  • remove both require() blocks in your go.mod, only have the first line (module) and the second one (go versionnumber) in there. remove EVERYTHING else.
  • delete go.sum if it exists
  • run sudo apt install golang
  • run sudo apt update && sudo apt upgrade
  • run sudo snap install hugo
  • run hugo mod get -u ./...
  • run hugo mod tidy
  • delete the admin folder as per @alcarazr note above
  • put all the changes into a commit on your repository. push the commit to the repository
  • if you run git status it should NOT show anything changed or untracked or uncommitted.

After that you should have the latest golang, the latest hugo and the latest modules.

Lean back, run hugo server, and do whatever you do when you need some luck (cross fingers). If it fails, let us know the output (from the hugo server call until the end of the output).

If you remove anything from the output that you think is “security relevant” rest assured that this is probably connected to your issue.

Thanks @irkode, I tried your suggestions but did not work (btw I had to replace flag --deleteDestinationDir by --cleanDestinationDir).

@alcarazr, wow that sounds promising! I’ve removed the content/admin folder as you did. Now the errors regarding “wowchemycms_config” have disappeared, but I still cannot get the website up and running:

$ hugo server --logLevel debug
WARN  deprecated: site config key paginate was deprecated in Hugo v0.128.0 and will be removed in a future release. Use pagination.pagerSize instead.
Start building sites … 
hugo v0.134.3-5fb333b9f5ff4ec018f9d78910177d0bec1befb0+extended linux/amd64 BuildDate=2024-09-19T14:28:20Z VendorInfo=snap:0.134.3
INFO  static: syncing static files to / duration 9.61775ms
INFO  build:  step process substep collect files 131 files_total 131 pages_total 81 resources_total 50 duration 21.289443ms
INFO  build:  step process duration 35.641597ms
INFO  build:  step assemble duration 55.983539ms
INFO  Data for key 'buttons' in path 'page_sharer.toml' is overridden by higher precedence data already in the data tree
ERROR deprecated: .Site.GoogleAnalytics was deprecated in Hugo v0.120.0 and will be removed in Hugo 0.135.0. Use .Site.Config.Services.GoogleAnalytics.ID instead.
INFO  build:  step render substep pages site en outputFormat html duration 3.017753933s
INFO  build:  step render substep pages site en outputFormat json duration 31.354667ms
INFO  build:  step render substep pages site en outputFormat rss duration 27.718076ms
INFO  build:  step render substep pages site en outputFormat webappmanifest duration 590.354µs
INFO  build:  step render pages 246 content 150 duration 3.079048496s
INFO  build:  step render deferred count 0 duration 3.095µs
INFO  build:  step postProcess duration 217.639µs
INFO  build:  duration 3.171187705s
Built in 3171 ms
Error: error building site: logged 1 error(s)

I guess the only difference with your setup is the Hugo version: you are running Hugo v0.133.1 whereas I have Hugo v0.134.3.

I have Hugo installed with snap, and downgrading to a specific version does not seem trivial. I’ve tried downgrading with $ sudo snap refresh hugo --channel=v0.133/stable and $ sudo snap refresh hugo --channel=v0.133/ex tended/stable, but without any success so far.

If you’re still getting deprecation errors you haven’t properly updated all your modules. Try substituting all your requires in your go.mod with this:

require (
	github.com/HugoBlox/hugo-blox-builder/modules/blox-bootstrap/v5 v5.9.8-0.20240908170534-4f621dfa3a5a
	github.com/HugoBlox/hugo-blox-builder/modules/blox-core v0.3.2-0.20240908170534-4f621dfa3a5a
	github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-netlify v1.1.2-0.20240908170534-4f621dfa3a5a
	github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-reveal v1.1.3-0.20240908170534-4f621dfa3a5a
	github.com/HugoBlox/hugo-blox-builder/modules/blox-seo v0.2.3-0.20240908170534-4f621dfa3a5a
)

Brilliant, that worked! Many many many thanks for your help @alcarazr!

I’ll now start applying the custom blocks I had temporarily removed.

2 Likes