No such template "_internal/google_analytics_async.html" occuring

Start building sites … 
hugo v0.129.0-e85be29867d71e09ce48d293ad9d1f715bc09bb9+extended linux/amd64 BuildDate=2024-07-17T13:29:16Z VendorInfo=gohugoio

ERROR render of "taxonomy" failed: "/tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/google/docsy@v0.6.0/layouts/_default/baseof.html:4:7": execute of template failed: template: _default/terms.html:4:7: executing "_default/terms.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:52:16: no such template "_internal/google_analytics_async.html"
ERROR render of "section" failed: "/tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/google/docsy@v0.6.0/layouts/docs/baseof.html:4:7": execute of template failed: template: docs/list.html:4:7: executing "docs/list.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:52:16: no such template "_internal/google_analytics_async.html"
ERROR render of "page" failed: "/tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/google/docsy@v0.6.0/layouts/docs/baseof.html:4:7": execute of template failed: template: docs/single.html:4:7: executing "docs/single.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:52:16: no such template "_internal/google_analytics_async.html"
Total in 32993 ms
Error: error building site: render: failed to render pages: render of "404" failed: "/tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/google/docsy@v0.6.0/layouts/_default/baseof.html:4:7": execute of template failed: template: 404.html:4:7: executing "404.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:52:16: no such template "_internal/google_analytics_async.html"

I am receiving the above error during upgrading my pipeline. I am using a scaffolded hugo from my company.

I did find this topic (Deprecate the async Google Analytics internal template · Issue #10899 · gohugoio/hugo · GitHub) that shows this is deprecated, but I am not calling this myself, it would appear the theme is. I am moving from 0.6.0 to 0.10.0 of Docsy. I am unsure how I can fix this myself, or if I can.

I even found a similar topic stating to remove it from my code, but nowhere in my repo is this called. I am thinking maybe its the repo I scaffolded from that needs updated.

Yes, we deprecated and eventually removed that internal template. We did print a warning for a long time, though.

What you (or the theme) can do to make this project/theme compatible with old and new Hugo versions is

Take the content of this file:

And store it in

layouts/_internal/google_analytics_async.html
1 Like

Thank you! This worked! I really appreciate it.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.