Fantomas42 / django-blog-zinnia

Simple yet powerful and really extendable application for managing a blog within your Django Web site.
http://django-blog-zinnia.com/
BSD 3-Clause "New" or "Revised" License
2.11k stars 730 forks source link

IndexErrors from breadcrumbs.py line 95 #569

Open mcfletch opened 4 years ago

mcfletch commented 4 years ago

https://github.com/Fantomas42/django-blog-zinnia/blob/881101a9d1d455b2fc581d6f4ae0947cdd8126c6/zinnia/breadcrumbs.py#L95

Has an assumption that breadcrumbs(...) will return a non-empty list. However it seems that certain crawlers are getting to the archive pages without a breadcrumb trail. I believe it should be sufficient, in this case to simply check:

if breadcrumbs:

before the call to set the url on the last breadcrumb.

elarroba commented 2 years ago

@mcfletch

I just created a fork of this project and updated the code to work with modern versions of Django (including 4.0+).

Please visit https://github.com/arrobalytics/django-blog-zinnia if you want to contribute. Don't forget to star the project to show your support.

Visit the new site https://www.djangoblogzinnia.com for documentation, demo and other resources.