Incompatibility between Cakeday,Data-Explorer and Animated Avatar plugins

Hi @piffy :slight_smile:

FWIW I have installed Animated Avatars on my test site (along with Cakeday :cake:), and I think I can replicate this error. :+1:

  • Install and enable both plugins
  • Use nifty code in rails console [1] to set test user’s joined date as a year ago today
  • Access /cakeday/anniversaries/today
  • Error 500
Message (4 copies reported)

ActiveModel::MissingAttributeError (missing attribute: admin)
app/models/concerns/roleable.rb:14:in `staff?'
lib/plugin/instance.rb:297:in `public_send'
lib/plugin/instance.rb:297:in `block (2 levels) in add_to_class'
(eval):8:in `_fast_attributes'
app/controllers/application_controller.rb:521:in `serialize_data'
app/controllers/application_controller.rb:414:in `block in with_resolved_locale'
app/controllers/application_controller.rb:414:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:74:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:366:in `call'
config/initializers/100-quiet_logger.rb:20:in `call'
config/initializers/100-silence_logger.rb:29:in `call'
lib/middleware/enforce_hostname.rb:24:in `call'
lib/middleware/request_tracker.rb:228:in `call'

Backtrace

activemodel (7.0.3.1) lib/active_model/attribute.rb:226:in `value'
activemodel (7.0.3.1) lib/active_model/attribute_set/builder.rb:43:in `fetch_value'
activerecord (7.0.3.1) lib/active_record/attribute_methods/read.rb:38:in `_read_attribute'
activemodel (7.0.3.1) lib/active_model/attribute_methods.rb:277:in `admin'
app/models/concerns/roleable.rb:14:in `staff?'
plugins/discourse-animated-avatars/plugin.rb:90:in `block (2 levels) in activate!'
lib/plugin/instance.rb:297:in `public_send'
lib/plugin/instance.rb:297:in `block (2 levels) in add_to_class'
activesupport (7.0.3.1) lib/active_support/core_ext/object/try.rb:15:in `public_send'
activesupport (7.0.3.1) lib/active_support/core_ext/object/try.rb:15:in `try'

I thought I could try an easier way and do the same on birthdays to sidestep mucking around in the rails console, but /cakeday/birthdays/today seemed to work fine.


  1. user = User.where(username: ‘Test_Three’)
    user.update(created_at: “2022-01-11 00:00:00.00000”) ↩︎

2 Likes