I have limited this error a bit. It happends only when a category has sub-categories. And /categories
gives error 500 too.
And I still aren’t sure if it comes from Calender. If yes is it another case where safe-mode is toothless?
But Lockdown gives this:
Message
HasCustomFields::NotPreloadedError (Attempted to access the non preloaded custom field 'redirect_url' on the 'Category' class. This is disallowed to prevent N+1 queries.)
app/models/concerns/has_custom_fields.rb:203:in `[]'
(eval):49:in `_fast_attributes'
lib/freedom_patches/ams_include_without_root.rb:57:in `include!'
lib/freedom_patches/ams_include_without_root.rb:57:in `include!'
app/controllers/application_controller.rb:531:in `serialize_data'
app/controllers/application_controller.rb:540:in `render_serialized'
app/controllers/categories_controller.rb:408:in `categories_and_topics'
app/controllers/categories_controller.rb:99:in `categories_and_latest'
app/controllers/application_controller.rb:422:in `block in with_resolved_locale'
app/controllers/application_controller.rb:422:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:64:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:389:in `call'
lib/middleware/gtm_script_nonce_injector.rb:10: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:233:in `call'
Backtrace
app/models/concerns/has_custom_fields.rb:203:in `[]'
plugins/discourse-category-lockdown/plugin.rb:18:in `block (2 levels) in activate!'
(eval):49:in `_fast_attributes'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:468:in `rescue in attributes'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:455:in `attributes'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:480:in `_serializable_hash'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:359:in `serializable_hash'
active_model_serializers (0.8.4) lib/active_model/serializer/associations.rb:124:in `block in serialize'
active_model_serializers (0.8.4) lib/active_model/serializer/associations.rb:123:in `map'
active_model_serializers (0.8.4) lib/active_model/serializer/associations.rb:123:in `serialize'
Env
HTTP HOSTS: foorumi.katiska.eu
So I’m quite sure this doesn’t come from plugins but Discourse itself, but again, I’m not a dev.