tomdyson / wagalytics

A Google Analytics dashboard in your Wagtail admin
MIT License
217 stars 42 forks source link

Gravatar throws `TemplateSyntaxError` #28

Closed Chris-May closed 6 years ago

Chris-May commented 6 years ago

I'm getting a TemplateSyntaxError when I visit the Analytics Dashboard in the admin panel:

django.template.exceptions.TemplateSyntaxError: 'gravatar' is not a registered tag library. Must be one of

I'm not sure why, as it was working before. I'm not sure if there was an update that would have changed this, but I haven't found anything definitive in recent history.

Any ideas?

Chris-May commented 6 years ago

Is Gravatar even being used? I don't see anything referencing it in the rest of the repository.

alexgleason commented 6 years ago

Thanks for reporting this. It's because of this commit in Wagtail itself: https://github.com/wagtail/wagtail/commit/5b8ca7d7e7389b6498c8e5017559e2fdc16b74b9. It seems that this happened in the 2.1.1 release, so this package is broken for any Wagtail install >=2.1.1.

I agree with you that Gravatar isn't being used. The fix is to simply remove gravatar from the {% load ... %} tag in the template. https://github.com/tomdyson/wagalytics/blob/95fe3944d59206cbf5f21cdc954f62d645bc37e4/wagalytics/templates/wagalytics/dashboard.html#L2

I'll fix this ASAP. I'm planning a major version release soon, but I think we should make a patch release for this.

alexgleason commented 6 years ago

This is fixed in 0.8, released today.