Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused taxonomy content files panics in 0.55 #5847

Closed
Severino opened this issue Apr 12, 2019 · 0 comments

Comments

Projects
None yet
3 participants
@Severino
Copy link

commented Apr 12, 2019

Hugo 0.55 fails to build when using taxonomies as follows, which worked fine in 0.54.

Example
https://gitlab.com/Ukmasmu/hugo-0.55.0-taxonomy-change

config.toml

[taxonomies]
author = "authors"

File-Structure

  • content
    • authors
      • goethe
        -_index.md
      • schiller
        -_index.md

Error Message

Building sites … panic: invalid taxonomy state for "D:\path\to\project\taxonomy-bug-0_55_0\content\authors\goethe\_index.md" with sections [authors goethe]
.
goroutine 20 [running]:
github.com/gohugoio/hugo/hugolib.(*pageState).getTaxonomyNodeInfo(0xc0006a6030, 0x1011e7a)
/root/project/hugo/hugolib/page.go:744 +0x1ee
github.com/gohugoio/hugo/hugolib.(*HugoSites).createMissingPages(0xc0002bb2d0, 0x0, 0x0)
/root/project/hugo/hugolib/hugo_sites.go:653 +0x340
github.com/gohugoio/hugo/hugolib.(*HugoSites).assemble(0xc0002bb2d0, 0xc000483780, 0xc00008fc70, 0x20)
/root/project/hugo/hugolib/hugo_sites_build.go:245 +0x141
github.com/gohugoio/hugo/hugolib.(*HugoSites).Build.func2.2()
/root/project/hugo/hugolib/hugo_sites_build.go:98 +0x43
runtime/trace.WithRegion(0x124a340, 0xc0003c8930, 0xff51a6, 0x8, 0xc00008fd20)
/usr/local/go/src/runtime/trace/annotation.go:137 +0xf0
github.com/gohugoio/hugo/hugolib.(*HugoSites).Build.func2(0xc0004bddc0, 0x20)
/root/project/hugo/hugolib/hugo_sites_build.go:100 +0x244
github.com/gohugoio/hugo/hugolib.(*HugoSites).Build.func3()
/root/project/hugo/hugolib/hugo_sites_build.go:109 +0x36
runtime/trace.WithRegion(0x124a340, 0xc0003c8930, 0xff223b, 0x7, 0xc0004bdec8)
/usr/local/go/src/runtime/trace/annotation.go:137 +0xf0
github.com/gohugoio/hugo/hugolib.(*HugoSites).Build(0xc0002bb2d0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/root/project/hugo/hugolib/hugo_sites_build.go:111 +0x7c4
github.com/gohugoio/hugo/commands.(*commandeer).buildSites(...)
/root/project/hugo/commands/hugo.go:763
github.com/gohugoio/hugo/commands.(*commandeer).fullBuild.func3(0x8, 0x10a34b0)
/root/project/hugo/commands/hugo.go:313 +0x80
golang.org/x/sync/errgroup.(*Group).Go.func1(0xc0003c8900, 0xc00019e6a0)
/go/pkg/mod/golang.org/x/sync@v0.0.0-20180314180146-1d60e4601c6f/errgroup/errgroup.go:58 +0x5e
created by golang.org/x/sync/errgroup.(*Group).Go
/go/pkg/mod/golang.org/x/sync@v0.0.0-20180314180146-1d60e4601c6f/errgroup/errgroup.go:55 +0x6d

Environments
This occured for me on:

  • Windows 10
  • Gitlab Pages

Links
@bep confirmed this as a bug in this post

@moorereason moorereason added the Bug label Apr 12, 2019

@bep bep added this to the v0.55.2 milestone Apr 13, 2019

bep added a commit to bep/hugo that referenced this issue Apr 15, 2019

hugolib: Fix panic for unused taxonomy content files
In Hugo 0.55 we connected the taxonomy nodes with their owning Page.

This failed if you had, say, a content file for a author that did not author anything in the site:

```
content/authors/silent-persin/_index.md
```

Fixes gohugoio#5847

bep added a commit to bep/hugo that referenced this issue Apr 15, 2019

hugolib: Fix panic for unused taxonomy content files
In Hugo 0.55 we connected the taxonomy nodes with their owning Page.

This failed if you had, say, a content file for a author that did not author anything in the site:

```
content/authors/silent-persin/_index.md
```

Fixes gohugoio#5847

@bep bep changed the title 0.55 taxonomies fail to compile Unused taxonomy content files panics in 0.55 Apr 15, 2019

@bep bep closed this in #5861 Apr 15, 2019

bep added a commit that referenced this issue Apr 15, 2019

hugolib: Fix panic for unused taxonomy content files
In Hugo 0.55 we connected the taxonomy nodes with their owning Page.

This failed if you had, say, a content file for a author that did not author anything in the site:

```
content/authors/silent-persin/_index.md
```

Fixes #5847
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.