After upgrading to 0.19 I am getting Test call 'containing' failed
, even if I drop all these tests from the template:
Error: Failed to serve the site
Error: Failed to render section '/home/charlie/src/halve-z/content/_index.md'
Error: Reason: Failed to render 'index.html' (error happened in a parent template)
Error: Reason: Test call 'containing' failed
Error: Reason: Tester `containing` was called on an undefined variable
theme: halve-z/templates at trunk · charlesrocket/halve-z · GitHub
CI: fix(config): set `generate_feeds` · charlesrocket/halve-z@6696f1f · GitHub
Is there a way to get more info on the error?
jieiku
July 16, 2024, 2:06am
2
In abridge I was getting a similar error using the containing terra function, it was because the feeds had changed:
opened 03:23AM - 21 Jun 24 UTC
closed 08:12AM - 21 Jun 24 UTC
# Bug Report
feeds worked fine with 0.18
I had to edit `generate_feed = tr… ue` to `generate_feeds = true`
however after doing so I see the following errors:
```
Error: Failed to serve the site
Error: Failed to render page '/home/jieiku/.dev/abridge/content/pages/contact.md'
Error: Reason: Failed to render 'pages.html' (error happened in 'base.html').
Error: Reason: Test call 'containing' failed
Error: Reason: Tester `containing` was called on an undefined variable
```
If I set `generate_feeds = false` then the site builds fine.
I assume this is related to this: https://github.com/getzola/zola/pull/2477 but I cannot say for sure. I am not using a custom feed template, I have always just let it build the feed using the default template.
## Environment
Zola version: 0.19.0
## Expected Behavior
the site to build or serve, or maybe to give a more detailed error.
## Current Behavior
```
env RUST_BACKTRACE=1 ~/zola serve
Building site...
Checking all internal links with anchors.
> Successfully checked 7 internal link(s) with anchors.
-> Creating 29 pages (4 orphan) and 13 sections
Error: Failed to serve the site
Error: Failed to render section '/home/jieiku/.dev/abridge/content/archive/_index.md'
Error: Reason: Failed to render 'archive.html' (error happened in 'base.html').
Error: Reason: Test call 'containing' failed
Error: Reason: Tester `containing` was called on an undefined variable
```
## Step to reproduce
git clone https://github.com/Jieiku/abridge
cd abridge
edit config.toml replacing occurrances of `generate_feed = true` with `generate_feeds = true`
zola serve
zola build
committed 05:04AM - 25 Jun 24 UTC
just grep your site for containing and if you use that function for feeds, then also grep for feed
1 Like
looped over feeds filenames and it works now, thanks!