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

date filter causes non-deterministic site build failure #2808

Open
JorySchossau opened this issue Feb 21, 2025 · 1 comment
Open

date filter causes non-deterministic site build failure #2808

JorySchossau opened this issue Feb 21, 2025 · 1 comment

Comments

@JorySchossau
Copy link

Bug Report

Environment

Linux: Solus OS
Linux: Ubuntu OS
Linux: WSL2

Zola version: 0.19.2

Expected Behavior

zola site should build every time deterministically, when using date filter in a template.

Current Behavior

No rust backtrace available.

Error: Reason: Failed to render 'listing.html'
Error: Reason: Filter call 'date' failed
Error: Reason: Filter `date` received an incorrect type for arg `value`: got `Null` but expected i64|u64|String
(build 0-6 times in a row of this error, then a build succeeds for some reason)

Step to reproduce

I have this in one of my templates, when removed the issue goes away.

<div class="post-date">{{ page.date | date(format="%B %d, %Y") }}</div>

Then try to build
zola build Maybe 1/3 the time the build succeeds okay. Usually the build fails. I just keep building until it succeeds. Not much of an issue on my local machine, but really puts a crimp in my automated git hook site deployment. I can write a for loop with max_retries around it...

@Keats
Copy link
Collaborator

Keats commented Feb 22, 2025

I don't why the page.date would be null sometimes and why running it multiple times would work.
Does it say which page failed to render?

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