שגיאת שרת פנימית עבור שאילתות מסוימות בתוסף data explorer

סיכום מבוסס בינה מלאכותית

Users are experiencing an Internal Server Error when running certain queries in the Data Explorer plugin, including standard queries like ‘Who has been sending the most messages in the last week?’ and ‘Most Common Likers’. Roi notes that the same queries work when executed directly on the database. The error log reveals a MissingAttributeError related to the admin attribute, suggesting a conflict with the animated-avatars plugin. David identifies the issue as potentially stemming from a plugin incompatibility, which is further supported by JammyDodger who confirms the issue on a test site with the same plugin installed. The discussion is being moved to a separate thread to address the plugin conflict related discussion.

As mentioned here I have errors when using some queries in the data explorer.

Other queries which came with Discourse installation also have the Internal Server Error, e.g.:

  • Who has been sending the most messages in the last week?
  • Most Common Likers

Others work.

And, as mentioned, when I use the Telegram query directly on the database, it works, too.

Can you check /logs on your site and see if there is any more detail on the errors?

Sure. Is that helping? I got it by copying it. But in the browser I see more.

Message (15 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):7:in `_fast_attributes'
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'

Env

HTTP HOSTS: www.sidemount-forum.com

From that backtrace, it seems like it could be related to the animated-avatars plugin, which is very strange! (cc @featheredtoast - any ideas?)

Can you check that your site and all plugins are up-to-date?

FWIW I have just installed Animated Avatars to repro this bug - Incompatibility between Cakeday,Data-Explorer and Animated Avatar plugins - #3 by JammyDodger and I also cannot run the ‘Top 100 Likers’ query on my test site (but can here on Meta).

Oh that’s interesting - must be the same cause. Let’s keep things over in the other topic: