feedreader / pluto

pluto gems - planet feed reader and (static) website generator - auto-build web pages from published web feeds
Creative Commons Zero v1.0 Universal
192 stars 14 forks source link

comparison of NilClass with Time failed (only fails with other blogs) #43

Open infominer33 opened 2 years ago

infominer33 commented 2 years ago

this is a fun one

This feed http://dustycloud.org/blog/index.xml produces this error *** error: comparison of NilClass with Time failed

but only fails when I run it together with all of the other feeds... run on its own with no other blogs in the .ini file, works fine.

This is the obnoxiously long debug log: https://github.com/Identosphere/identity-blogcatcher/raw/master/weirdbug.txt This is the site that causes fail not failing on its own. https://raw.githubusercontent.com/Identosphere/identity-blogcatcher/master/weirdnotbug.txt

not sure what I'm expecting here, but I spent so much time chasing this down, I couldn't not report

geraldb commented 2 years ago

Thanks for reporting the error. Cheers.

infominer33 commented 1 year ago

ok, I figured out finally this happens with a blog that doesn't have a published date.

I went to a sqlite browser and found the offending entries, but I do noticed they had other date formats saved in the database such as "updated"

so ideally pluto would check other possibilities, instead of failing when there is no published date

geraldb commented 1 year ago

Thanks for the update. If possible can you post the web feed entry that would really help (including makeing a test case / unit so it won't happen again).

The date uses fallbacks - see https://github.com/feedreader/pluto/blob/master/pluto-models/lib/pluto/models/item.rb#L43 but sure there are way too many different dates so it is hard to say what date causes the problem. Maybe it is just a bug in the template (merge) and not in the feed fetcher. Sorry I can only speculate. All the best. Cheers. Prosit 2023!