Section secret: two out of 5 sections not rendering

Hi,

I happily used hugo 0.30.2 till yesterday when I tried to migrate to new debian machine with hugo 0.58.3

This throws warnings about using _index.md and index.md in 3 sections (hund, kontakt and iveco-womo) - so I renamed some stuff.

Structure is like this:

blog       
hund       
iveco-technik  
iveco-womo
kontakt    

_index.md  

blog has it’s own list template, all others use the _default list template.

When doing hugo I get blog (own template), hund and kontakt (both default) ok, but iveco-technik and iveco-womo are empty folders exept index.xml with 855 Bytes - that is the header of the file, no list of pages.
I tried to rename the folders to exclude the - but that doesn’t seem to have any influence.

This is what hugo tells me:

$ hugo server -w -D -F --verbose --disableFastRender
INFO 2019/12/23 16:19:01 No translation bundle found for default language "de"
INFO 2019/12/23 16:19:01 Translation func for language de not found, use default.
INFO 2019/12/23 16:19:01 i18n not initialized; if you need string translations, check that you have a bundle in /i18n that matches the site language or the default language.
INFO 2019/12/23 16:19:01 Using config file: 
Building sites … INFO 2019/12/23 16:19:01 syncing static files to /
WARN 2019/12/23 16:19:01 Page's .Hugo is deprecated and will be removed in a future release. Use the global hugo function.
WARN 2019/12/23 16:19:01 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 }}.
WARN 2019/12/23 16:19:01 Page's .URL is deprecated and will be removed in a future release. Use .Permalink or .RelPermalink. If what you want is the front matter URL value, use .Params.url.

                   | DE   
+------------------+-----+
  Pages            | 324  
  Paginator pages  |  13  
  Non-page files   |   0  
  Static files     | 984  
  Processed images |   0  
  Aliases          |   1  
  Sitemaps         |   1  
  Cleaned          |   0  

Total in 177 ms
Watching for changes in /home/foldername{archetypes,content,static,themes}
Watching for config changes in /home/foldername/config.toml
Environment: "development"
Serving pages from memory
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop

So obviously no errors.

Any hints on how to investigate further appreciated.

I just found the --debug option of hugo and this is what it tells me about the templates:

DEBUG 2019/12/23 20:43:26 Add template file: name "404.html", baseTemplatePath "", path "404.html"
DEBUG 2019/12/23 20:43:26 Add template file: name "_default/list.html", baseTemplatePath "", path "_default/list.html"
DEBUG 2019/12/23 20:43:26 Add template file: name "_default/single.html", baseTemplatePath "", path "_default/single.html"
DEBUG 2019/12/23 20:43:26 Add template file: name "_default/taxonomy.html", baseTemplatePath "", path "_default/taxonomy.html"
DEBUG 2019/12/23 20:43:26 Add template file: name "_default/terms.html", baseTemplatePath "", path "_default/terms.html"
DEBUG 2019/12/23 20:43:26 Add template file: name "blog/single.html", baseTemplatePath "", path "blog/single.html"
DEBUG 2019/12/23 20:43:26 Add template file: name "index.html", baseTemplatePath "", path "index.html"
DEBUG 2019/12/23 20:43:26 Add template file: name "section/blog.html", baseTemplatePath "", path "section/blog.html"
DEBUG 2019/12/23 20:43:26 Add template file: name "section/blog.rss.xml", baseTemplatePath "", path "section/blog.rss.xml"
DEBUG 2019/12/23 20:43:26 Add template file: name "sitemap/single.html", baseTemplatePath "", path "sitemap/single.html"
DEBUG 2019/12/23 20:43:26 Add template file: name "sitemap.xml", baseTemplatePath "", path "sitemap.xml"

as well as all sorts of partials and shortcodes.
This confirms what I described above but still those 2 sections are not rendering despite no obvious errors.

I put a repo here:
https://github.com/ominty/ominty-hugoissues (master)

In top navigation you may test the four sections, Nr. 1 (Wohnmobil) throws 404, the other three will render as expected.

Hi there,

I don’t see iveco-technik in your repo at all.

When I try to run hugo on your site I get the following output:

public/ivecowomo/
├── aufbau-demontage.html
├── aufbau.html
├── aufbau-lagerung.html
├── aufbau-probleme.html
├── aufbau-tuerprobleme.html
├── einrichtung.html
├── elektrik.html
├── fahrgestell.html
├── index.xml
├── links.html
├── procon.html
└── teaser_iveco-womo.html

Are you getting a different result?


The section list page itself is rendered in /ivecowomo.html, not /ivecowomo/index.html. This is because of this line in your config. [Docs here].

So this nav entry points to /ivecowomo/start.html. I’m assuming this corresponds to content/ivecowomo/start.md. In the frontmatter for this page, you have:

url         = "womo/index.html"

so this is rendered at womo/index.html, as indeed specified.

sorry for confusion caused by some mistakes while transferring parts of my production repo to the test repo I shared.
Part of this is also caused by the fact that I have to restart hugo server every now and then to reflect the changes I did, despite using hugo server -w -D -F --disableFastRender.

Those Issues should be fixed now and the repo should reflect the above problem - two sections not rendering: iveco-technik and iveco-womo.
I did some further investigation and it seems that when editing config.toml in line 28 to comment out the iveco = "iveco" line this “solves” the problem.
I don’t understand why - and this is not really a solution as I need that taxonomy.

When I do a diff of the public folder for both cases I get (no file extension means ‘folder’)

iveco.html
iveco
iveco/bereifung.html
iveco/blogartikel.html
iveco/elektrik.html
iveco/ersatzteile.html
iveco/fahrzeugtechnik.html
iveco/index.xml
iveco/lichtmaschine.html
iveco/bereifung
iveco/bereifung/index.xml
iveco/blogartikel
iveco/blogartikel/index.xml
iveco/elektrik
iveco/elektrik/index.xml
iveco/ersatzteile
iveco/ersatzteile/index.xml
iveco/fahrzeugtechnik
iveco/fahrzeugtechnik/index.xml
iveco/lichtmaschine
iveco/lichtmaschine/index.xml

when Taxonomy is active (these are the taxonomy list pages and the corresponding RSS feeds), but I get instead

iveco-technik/175zoll.html
iveco-technik/blogartikel.html
iveco-technik/drehstab.html
iveco-technik/einspritzpumpe.html
iveco-technik/elektrik.html
iveco-technik/kuehlung.html
iveco-technik/optimierung.html
iveco-technik/reifen.html
iveco-technik/reifenmontage.html
iveco-technik/reparaturbuch.html
iveco-technik/steuerkette.html
iveco-technik/teaser_iveco-technik.html
iveco-technik/technik1.html
iveco-technik/technik2.html
iveco-womo/anfang.html
iveco-womo/aufbau-demontage.html
iveco-womo/aufbau-lagerung.html
iveco-womo/aufbau-probleme.html
iveco-womo/aufbau-tuerprobleme.html
iveco-womo/aufbau.html
iveco-womo/blogartikel.html
iveco-womo/einrichtung.html
iveco-womo/elektrik.html
iveco-womo/fahrgestell.html
iveco-womo/links.html
iveco-womo/procon.html
iveco-womo/teaser_iveco-womo.html
wohnmobile/homepage.html
wohnmobile/iveco.html
wohnmobile/wind.html
wohnmobile/homepage
wohnmobile/homepage/index.xml
wohnmobile/iveco
wohnmobile/iveco/index.xml
wohnmobile/wind
wohnmobile/wind/index.xml

when commented out - two sections are rendered correctly, but there are also more entries in taxonomy “wohnmobile” which were not rendered before - a problem I did not note till I did that diff.
All other rendered files and folders are the same for both cases.

I think this may be a bug. Somehow, given a taxonomy tag = tags, a section with name beginning tags (eg tagsfoo) becomes a taxonomy .Kind as well.

I am able to reproduce this way:

On a new Hugo site, with minimal layouts list.html and single.html:

hugo new tagsfoo/_index.md

config:

[taxonomies]
  tag = "tags"

printing out {{.}} / {{.Kind}} in layouts, and navigating to http://localhost:1313/tagsfoo/

Page(/tagsfoo/_index.md) / taxonomy

Upon testing with previous versions of Hugo, this appears to be broken starting 0.57. I suggest you create an issue on GitHub. It would probably help as well to create a minimal lorem ipsum type repo that shows this issue.


For a short-term solution, either downgrade Hugo to below 0.57, or:

  1. rename content/tagsfoo/ to content/footags/
  2. set permalinks in config:
[permalinks]
  footags = "/tagsfoo/:slug"
  1. set content/footags/_index.md frontmatter:
url: "/tagsfoo/"

I hope that made sense?

1 Like

Thanks for confirmation.
I’ve put a temporary workaround on that site.
You suggest renaming the sections but that would make all existing links from “the outside world” useless.
So I decided to rename the taxonomy - in this case from iveco to ivecobasis with the same effect, but less side-effects.
And indeed - this works!

I’ll file a bug report next.

done:

Yeah, but step 2 and 3 should take care of that: these steps would have content/footags/bar.md publish as yoursite.com/tagsfoo/bar/. If renaming the taxonomy suits you, that’s great.