-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Crash happens with _index.md content files with draft=true [v0.58.0-DEV-321418f] #6222
Comments
What do you mean by "still happens"? Do you have a link to an exstisting issue? |
I have removed "still" from bug title. |
To answer your question: We don't support "draft" (or expired etc.) for |
I have explained a real use case scenario on the forum where I found the draft of For convenience:
Please consider supporting this. |
We can probably implement it, but there's not a single test covering this, and I'm not sure what's going to happen with the pages in the section if you "draft" the owner etc. |
I believe the pages with drafted The other pages and leaf/branch bundles in that taxonomy section will render as usual.
If you do not mind, please add the |
Draft means more than that, it means "don't publish this page" (there is content and other metadata). @regisphilibert is this related to your crash? |
I agree, but as far as I knew, the content of draft pages is inaccessible (so I probably misrepresented as "empty"). As an additional data point, |
I will need to think about this. But this issue at least helped me fix a stupid crash. |
@kaushalmodi my short term fix for this (will commit in a few) will, I think, be somewhat in line with what you want. We may revisit this later with a "better spec". |
We will need to revisit this with a proper spec, but this commit makes sure that draft/expiryDate etc. set in front matter on _index.md content files that should disable the page will: * Not crash * Make the rendered page not render any `.Content`. Fixes gohugoio#6222 Fixes gohugoio#6210
We will need to revisit this with a proper spec, but this commit makes sure that draft/expiryDate etc. set in front matter on _index.md content files that should disable the page will: * Not crash * Make the rendered page not render any `.Content`. Fixes gohugoio#6222 Fixes gohugoio#6210
Yep, we had a drafted section in there, undrafting it fixed the pb. I'm aligned with @kaushalmodi as in I need to be able to draft sections. |
I confirm the fix in #6224 (that the crash does not happen any more, and also the |
We will need to revisit this with a proper spec, but this commit makes sure that draft/expiryDate etc. set in front matter on _index.md content files that should disable the page will: * Not crash * Make the rendered page not render any `.Content`. Fixes gohugoio#6222 Fixes gohugoio#6210
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hello,
I tried building the latest hugo from the master branch, but l see the
draft=true
crash happening if a branch bundle_index.md
content file hasdraft=true
.Here's one such example content file: https://gitlab.com/kaushalmodi/kaushalmodi.gitlab.io/blob/crash-hugo-v57-draft-branch-bundle/content/series/gujarati-in-emacs/_index.md
Recipe to reproduce the crash
git clone --recurse-submodules --single-branch --branch crash-hugo-v57-draft-branch-bundle https://gitlab.com/kaushalmodi/kaushalmodi.gitlab.io scripter.co
cd scripter.co
hugo
Crash report
The text was updated successfully, but these errors were encountered: