"ghost" old models of templates or hooks hijack hugo!

Regularly old render-hooks or templates crop up from God-knows-where, and editing the real ones has no effect. It acts on both production and server environment.
Here’s the exemple:
partial code render-link.html

<figure>{{ with .Title }}
<figcaption class=figcaption_class>
{{ end }}
<img srcset="{{ $smallest.RelPermalink }} {{$smallest.Width}}w{{ range uniq (slice $very_small $small $smallmedium $medium $mediumlarge $large $img) }},
{{ .RelPermalink }} {{.Width}}w{{end}}" {{ with $smallest }}width="{{.Width}}" height="{{.Height}}"{{end}}
 src="{{ $large.RelPermalink }}"
 loading="{{with .Attributes.loading}}{{ . }}{{else}}lazy{{end}}"
 sizes="(max-width: 400px) 100vw, (max-width: 604px) 50vw, 42.5vw"></figure>

html produced:

<figure id=normal class=image><figcaption class=figcaption_class>Find your origins lost to time</figcaption><a href=./Images/spirituality/mythology/modern/warcraft/new_cover_warcraft.webp target=_blank><img src=./Images/spirituality/mythology/modern/warcraft/new_cover_warcraft.webp srcset=“./Images/spirituality/mythology/modern/warcraft/new_cover_warcraft_hue1da11df08ad4ace5b3ba148baef5363_411026_200x0_resize_q100_h2_mitchellnetravali_2.webp 200w, ./Images/spirituality/mythology/modern/warcraft/new_cover_warcraft_hue1da11df08ad4ace5b3ba148baef5363_411026_400x0_resize_q100_h2_mitchellnetravali_2.webp 400w, ./Images/spirituality/mythology/modern/warcraft/new_cover_warcraft.webp 549w” width=549 height=707 loading=eager alt=cover title=“Find your origins lost to time” sizes=“(max-width: 400px) 100vw, (max-width: 604px) 50vw, 35vw” style=background-image:url(data:image/webp;base64,UklGRsoAAABXRUJQVlA4IL4AAACwBQCdASoUABoAPqVEmEejIaEUBVQzCkT2AFiPmXjcMAAkiKH/bSvk4q9fhRRihDMlY5AuagAA/uxKvdrrlpkxWQT6mxzii3ei5F0nhVGmg1dXf718X/FPEnz66LtCa+wQtQqLWvMTv2bUBtHpTsRNjJs/k0sguscCz5D2kUnofoCJGGiXRzImJzVVmvLkd0E+qqpmCpZ5MEA2qKQsy/SgfEyK4nQWWtKfON827dwhbp3rsc25kdQzA68UAAAA);background-size:cover></a></figure>

I thought precedently that it had mixed up the normal hook and that of the home type, but no ! It’s an old model I can’t seem to modify anywhere. Even emptying the hooks entirely doesn’t disturb it.
Where do these “hidden templates” come from ?

I must stress, that whatever is causing this is a strange error in hugo’s design, because it looks like some kind of cache - which I can not locate - but the parameter --ignoreCache doesn’t do anything against it.

I have not experienced anything remotely what you describe. For the server I would say you could experience browser cache, but when you say the production build is the same, it doesn’t make sense. There’s no template cache involved between builds, unless you somehow pull in these templates remotely … in which you need to show us the full source.

I might add that I do ctll+r and ctrl+shift+r, and try on two browsers, and purge the caches.
I’ll try with a sample, probleml is last time I did it, the issue disappeared randomly !!
Here (folder, not a tarball). Good luck catching the fly before it flees !
By the way out of the blue that very project now complains:

hugo v0.111.3-5d4eb5154e1fed125ca8e9b5a0315c4180dab192+extended linux/amd64 BuildDate=2023-03-12T11:40:50Z VendorInfo=gohugoio
WARN 2023/05/17 23:52:26 found no layout file for “HTML” for kind “section”: You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

What is this nonsense :laughing:, it has a single.html, baseof.html, home.html, list.html, everything. And I certainly didn’t erase any file under theme/ while making that sample. But it doesn’t stop the project from running.

I found a solution.
I replaced the shortcode inclusion scheme by putting type: home on intro.md (along with _build: render: false and I put {{with .GetPage "intro.md"}}{{.Content }}{{end}} in home.html. Now
there is no ghost issue anymore.
Still no clue where it came from :ghost: :expressionless:

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