Problem with generating RSS feed

I’ve been trying to generate an RSS feed for (Tags, downloads, podcasts) my downlods and podcasts XML feeds are fine, but as soon as I put the tags as rss=true Zola crashes.

The crash output is:

> λ zola serve
> Building site...
> -> Creating 19 pages (0 orphan), 4 sections, and processing 0 images
> thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', src\libcore\option.rs:345:21
> stack backtrace:
>    0: <unknown>
>    1: <unknown>
>    2: <unknown>
>    3: <unknown>
>    4: <unknown>
>    5: <unknown>
>    6: <unknown>
>    7: <unknown>
>    8: <unknown>
>    9: <unknown>
>   10: <unknown>
>   11: <unknown>
>   12: <unknown>
>   13: <unknown>
>   14: <unknown>
>   15: <unknown>
>   16: <unknown>
>   17: <unknown>
>   18: <unknown>
>   19: <unknown>
>   20: <unknown>
>   21: BaseThreadInitThunk
>   22: RtlUserThreadStart

Here is my toml site config taxonomies

> taxonomies = [
>     {name = "tags", rss = true, paginate_by = 75}, 
>     {name = "english", rss = false, paginate_by = 5},  
>     {name = "authors", rss = false, paginate_by = 5}, 
>     {name = "downloads", rss = true, paginate_by = 10},
>     {name = "podcast", rss = true, paginate_by = 75}, 
> ]

I have a custom rss.xml in templates:

> <rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
>     <channel>
>         <title>TEST</title>
>         <link>{{ config.base_url }}</link>
>         <description>{{ config.description }}</description>
>         <generator>Gutenberg</generator>
>         <language>{{ config.default_language }}</language>
>         <atom:link href="{{ feed_url }}" rel="self" type="application/rss+xml"/>
>         <lastBuildDate>{{ last_build_date | date(format="%a, %d %b %Y %H:%M:%S %z") }}</lastBuildDate>
>         {% for page in pages %}
> 
>             {% if page.taxonomies.podcast %}
>                 
>             {% endif %}
> 
>             <item>
>                 <title>{{ page.title }}</title>
>                 <pubDate>{{ page.date | date(format="%a, %d %b %Y %H:%M:%S %z") }}</pubDate>
>                 <link>{{ page.permalink }}</link>
>                 <guid>{{ page.permalink }}</guid>
>                 <description>{% if page.summary %}{{ page.summary }}{% else %}{{ page.content }}{% endif %}</description>
>             </item>
>         {% endfor %}
>     </channel>
> </rss>

which for now mirrors the internal template.

My assumption is that I’ve a poorly formatted front matter, missing text quote or missing comma in an array, but I’ve checked every item in my markdown and cannot find it, the error is saying none but no idea where, I can say that the tags rss.xml output is partially complete, so its not failing to process tags.

Can anyone tell me a way to pinpoint where to look for my error?

Thanks

Is your site open-source? This is a Rust error saying that an unwrap was used which should be used when it’s sure it can never be None. If you can share the site in some ways (repo, email etc), I can debug it.
To debug it on your end, you’ll need Rust installed and to build the next branch of the repo so you can get the full stacktrace

Sorry for the delay in getting back to your question. The website is not open source unfortunately. It would be great if someone were to point me at a Rust debug how-to :slight_smile: But for now I’m just ignoring this issue. There are a number of places where Zola just falls over, now I’m using it in anger. I just work around them as I’m on a deadline. For the most part Zola is great, I have no complaints. When I have time I would love to thrash out the edge cases where zola needs some love :heart_eyes:

There are a number of places where Zola just falls over
:frowning_face:
The same way?

If you have Rust installed locally, you can git clone the repository GitHub - getzola/zola: A fast static site generator in a single binary with everything built-in. https://www.getzola.org, checkout the next branch and run cargo build. There should now be an executable in the folder target/release called zola. If you try to run that with backtraces on, it will show the actual stacktrace rather than . To rule out a template engine issue you can let rss.xml be empty and see if it still panics.

Thanks for the instructions. We are going to work on this once the main migration is over. Currently I am bored out of my mind mapping legacy URL to new URL in my caddy website config file.

I am currently travelling so not much free time but the new release should happen this weekend.

Just gave Zola V0.9 A test and wow, great set of improvements, thank you to all involved. I can report that the issue I was having with generating my tags RSS feed is now fixed. I changed nothing I upgraded and the feeds now work. Hate not knowing what the problem was but I am happy to accept the fix :slight_smile:

Also being able to change the config.toml and the site auto reloading is such a nice feature, really makes a big difference.

So a big thank you for all the efforts on V0.9.

1 Like