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

get_taxonomy_url throws error if content is draft #319

Closed
unrealhoang opened this issue Jun 21, 2018 · 4 comments
Closed

get_taxonomy_url throws error if content is draft #319

unrealhoang opened this issue Jun 21, 2018 · 4 comments

Comments

@unrealhoang
Copy link
Contributor

Currently get_taxonomy_url will throws error if content is draft and there's a new tag in the page.

Reason: `get_taxonomy_url`: couldn't find `rust` in `tag` taxonomy
@Keats
Copy link
Collaborator

Keats commented Jun 21, 2018

is the rust tag only present in the draft page?

@unrealhoang
Copy link
Contributor Author

Yes, it's a newly created tag.

@Keats
Copy link
Collaborator

Keats commented Jun 22, 2018

Tags and categories are only populated for posts that are not draft, otherwise the draft posts would show up in the taxonomies pages. The get_taxonomy_url uses those taxonomies to build the result so that's expected since the page won't be built if there is only a draft page associated with it.

I think this is expected behaviour and the template should just have a {% if not page.draft ... around the global fn call

@Keats
Copy link
Collaborator

Keats commented Jul 5, 2018

Going to close as this is expected behaviour I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants