Unknown taxonomy error
I ran zola init and then followed the directions for the Even theme and I got the following error:
$ zola serve
Building site...
-> Creating 1 pages (0 orphan), 0 sections, and processing 0 images
Error: Failed to render page 'zola-blog/content/first_post.md'
Reason: Failed to render 'even/templates/page.html'
Reason: `get_taxonomy_url` received an unknown taxonomy as kind: tags
Here is a gist of all the files I created. https://gist.github.com/pianomanfrazier/9f76f42ee77f544bbb6ddfa11a5ad255
I am not sure how to fix the error. I have the taxonomy tags defined in my config.toml and then in /content/first_post.md I define some tags.
Using zola 0.7.0
After playing with it a bit it seems that this error comes up when the reloading server is running and I change a tag in the post metadata to something new. The issue is probably with zola.
That's caused by the page.html template.
It can be reproduced within even.
zola serve- edit
content/first_post.mdand change a tag to another, non-existing tag (e.g.tag1->tag2) - the serve log shows:
Change detected @ 2019-05-08 23:47:37
-> Content changed /Users/jhereth/repos/even/content/first_post.md
Failed to build the site
Error: Failed to render page '/Users/jhereth/repos/even/content/first_post.md'
Reason: Failed to render 'page.html'
Reason: `get_taxonomy_url`: couldn't find `tag2` in `tags` taxonomy
Done in 11ms.
The error message comes from page.html, L48 - the renderer needes the urls for all tags of the page - but the new tag is not yet known.
The error seems similar to zola's #319 but also happens on non-draft pages.
Not sure if this can be fixed within the theme.
So it looks like the issue is that on reload, the templates are re-rendered without recreating the get_taxonomy function first? If so that is definitely a bug in Zola
@Keats yes, it happens on zola serve only, zola build works fine. I didn't find where the difference comes from.
I am getting it both with server and build. Using anpu theme.
which version of zola?
0.14.1
Sorry, I realize this is a different theme. I thought this was zola. I will try with this theme to see if it is the theme or config. The error message looks identical
Edit: Yup, same error with even theme
Sorry, I realize this is a different theme. I thought this was zola. I will try with this theme to see if it is the theme or config. The error message looks identical
Edit: Yup, same error with even theme
I think you may be filling in taxonomy in config.toml below [markdown].
I was having trouble with the same error, but when I changed where I filled it in, that error did not occur.
Wouldn't you know it. I copied the config.toml from the theme, which had it in the [markdown] block. I just checked the config.toml in this repo, and works a charm. Thank you so much!
I've run in to this issue too.
Error: Reason: `get_taxonomy_term_by_name` received an unknown taxonomy as kind: project
I get this error with this code:
get_taxonomy_term(kind="project", term="foo")
However this works:
get_taxonomy(kind="project")
I don't have the [markdown] config.toml issue mentioned above