# Allowing get\_page to fail

**URL:** <https://zola.discourse.group/t/allowing-get-page-to-fail/2939>\
**Category:** Feature requests\
**Created:** [May 4, 2026, 1:00am UTC](https://zola.discourse.group/t/allowing-get-page-to-fail/2939 "2026-05-04T01:00:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lazaroofarrill](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/lazaroofarrill/32/1613_2.png) [@lazaroofarrill](https://zola.discourse.group/u/lazaroofarrill)\
**Post date:** [May 4, 2026, 1:00am UTC](https://zola.discourse.group/t/allowing-get-page-to-fail/2939/1 "2026-05-04T01:00:41Z")

</div>

Hello.

I was trying to generate some links on my site but I hit an issue when generating a link to a page in draft. When building for prod this fails since draft pages are removed completely from the search tree.

I saw this issue on Github. It was stale so I patched this for me by adding an optinal allow\_missing parameter to get \_page similar to the one in images.  
I wanted to know if this could be merged or if there’s already a better way to address this use case.

Thanks and hello.

> <https://github.com/getzola/zola/issues/1991>
>
> \# Bug Report
> 
> \## Environment
> 
> Zola version: 0.16.0
> 
> \## Expected Behavior
> …This function is probably working as originally intended, so what I am asking for may actually be a new feature unless there is another way to accomplish this?
> 
> \## Current Behavior
> This started with a feature request to not show certain menu items if those pages are marked as draft. https://github.com/Jieiku/abridge/issues/92
> 
> I created a solution:
> 
> https://github.com/Jieiku/abridge/commit/bca64259827edb25a19c4b910ab28907b0b29d93
> 
> but if I set draft = true for about.md then zola no longer builds/serves the site.
> 
> \`\`\`
> Building site...
> Checking all internal links with anchors.
> \> Successfully checked 1 internal link(s) with anchors.
> \-\> Creating 12 pages (2 orphan) and 2 sections
> Error: Failed to serve the site
> Error: Failed to render section '/home/jieiku/.dev/abridge/content/posts/\_index.md'
> Error: Reason: Failed to render 'posts.html' (error happened in a parent template)
> Error: Reason: Function call 'get\_page' failed
> Error: Reason: Page \`pages/about.md\` not found.
> \`\`\`
> 
> \## Step to reproduce
> 
> \`\`\`sh
> git clone -b menu-draft-check https://github.com/Jieiku/abridge
> cd abridge
> zola serve
> \`\`\`
> 
> The site will serve/build if you set \`draft = false\` in \`content/pages/about.md\`
> 
> If there is another way of doing this that I have not figured out then I appologize for the report, I did review the zola and tera documentation first and spent a couple of days thinking about the issue.
