pattex / jekyll-tagging

Jekyll plugin to automatically generate a tag cloud and tag pages.
385 stars 76 forks source link

active_tag_data throws exception occasionally #24

Open yegor256 opened 10 years ago

yegor256 commented 10 years ago

This is what I'm getting, time to time:

/usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/jekyll-tagging-0.5.0/lib/jekyll/tagging.rb:119:in `active_tag_data': undefined method `config' for nil:NilClass (NoMethodError)
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/jekyll-tagging-0.5.0/lib/jekyll/tagging.rb:96:in `tag_cloud'
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/liquid-2.6.1/lib/liquid/strainer.rb:43:in `invoke'
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/liquid-2.6.1/lib/liquid/context.rb:82:in `invoke'
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/liquid-2.6.1/lib/liquid/variable.rb:50:in `block in render'
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/liquid-2.6.1/lib/liquid/variable.rb:38:in `each'
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/liquid-2.6.1/lib/liquid/variable.rb:38:in `inject'
...

I think that the problem is that you're relying on a static property Tagger.site being initialized. But it's not always true. I'm sure what exactly is going on. I'm using Jekyll 2.2.0

pattex commented 10 years ago

I have to give attention to the current Jekyll. I'm still on 0.12.1 (shame on me). I will take a look when I'm up to date.