PMs für Mitarbeiter zulassen

Seit Version 2026.7.0-latest +1 und auch in der heutigen Version kann ich keine PN (Private Nachrichten) mehr senden. Ich habe die Logs überprüft und dabei discourse-allow-pm-to-staff gefunden. Nachdem ich dieses Plugin deaktiviert hatte, funktionierten die PN wieder. Hier ist, was ich in den Logs gefunden habe:

plugins/discourse-allow-pm-to-staff/plugin.rb:46:in 'block (2 levels) in activate!'

lib/plugin/instance.rb:460:in 'Kernel#public_send'

lib/plugin/instance.rb:460:in 'block (2 levels) in Guardian#add_to_class'

lib/topic_creator.rb:356:in 'TopicCreator#check_can_send_permission!'

lib/topic_creator.rb:305:in 'block in TopicCreator#add_users_from_scope'

activerecord (8.0.5) lib/active_record/relation/batches.rb:88:in 'Array#each'

activerecord (8.0.5) lib/active_record/relation/batches.rb:88:in 'block in ActiveRecord::Batches#find_each'

activerecord (8.0.5) lib/active_record/relation/batches.rb:172:in 'block in ActiveRecord::Batches#find_in_batches'

activerecord (8.0.5) lib/active_record/relation/batches.rb:461:in 'block in ActiveRecord::Batches#batch_on_unloaded_relation'

<internal:kernel>:168:in 'Kernel#loop'

activerecord (8.0.5) lib/active_record/relation/batches.rb:434:in 'ActiveRecord::Batches#batch_on_unloaded_relation'

activerecord (8.0.5) lib/active_record/relation/batches.rb:289:in 'ActiveRecord::Batches#in_batches'

activerecord (8.0.5) lib/active_record/relation/batches.rb:171:in 'ActiveRecord::Batches#find_in_batches'

activerecord (8.0.5) lib/active_record/relation/batches.rb:87:in 'ActiveRecord::Batches#find_each'

lib/topic_creator.rb:304:in 'TopicCreator#add_users_from_scope'

lib/topic_creator.rb:289:in 'TopicCreator#add_users'

lib/topic_creator.rb:271:in 'TopicCreator#process_private_message'

lib/topic_creator.rb:69:in 'TopicCreator#create'

lib/post_creator.rb:511:in 'PostCreator#create_topic'

lib/post_creator.rb:201:in 'block in PostCreator#create'

lib/post_creator.rb:411:in 'block in PostCreator#transaction'

activerecord (8.0.5) lib/active_record/connection_adapters/abstract/transaction.rb:626:in 'block in ActiveRecord::ConnectionAdapters::TransactionManager#within_new_transaction'

activesupport (8.0.5) lib/active_support/concurrency/null_lock.rb:9:in 'ActiveSupport::Concurrency::NullLock#synchronize'

activerecord (8.0.5) lib/active_record/connection_adapters/abstract/transaction.rb:623:in 'ActiveRecord::ConnectionAdapters::TransactionManager#within_new_transaction'

activerecord (8.0.5) lib/active_record/connection_adapters/abstract/database_statements.rb:367:in 'ActiveRecord::ConnectionAdapters::DatabaseStatements#within_new_transaction'

activerecord (8.0.5) lib/active_record/connection_adapters/abstract/database_statements.rb:359:in 'ActiveRecord::ConnectionAdapters::DatabaseStatements#transaction'

activerecord (8.0.5) lib/active_record/transactions.rb:233:in 'block in ActiveRecord::Transactions::ClassMethods#transaction'

activerecord (8.0.5) lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in 'ActiveRecord::ConnectionAdapters::ConnectionPool#with_connection'

activerecord (8.0.5) lib/active_record/connection_handling.rb:312:in 'ActiveRecord::ConnectionHandling#with_connection'

activerecord (8.0.5) lib/active_record/transactions.rb:232:in 'ActiveRecord::Transactions::ClassMethods#transaction'

lib/post_creator.rb:411:in 'PostCreator#transaction'

lib/post_creator.rb:199:in 'PostCreator#create'

lib/new_post_manager.rb:316:in 'NewPostManager#perform_create_post'

lib/new_post_manager.rb:247:in 'NewPostManager#perform'

app/controllers/posts_controller.rb:218:in 'PostsController#create'

actionpack (8.0.5) lib/action_controller/metal/basic_implicit_render.rb:8:in 'ActionController::BasicImplicitRender#send_action'

actionpack (8.0.5) lib/abstract_controller/base.rb:215:in 'AbstractController::Base#process_action'

actionpack (8.0.5) lib/action_controller/metal/rendering.rb:193:in 'ActionController::Rendering#process_action'

actionpack (8.0.5) lib/abstract_controller/callbacks.rb:261:in 'block in AbstractController::Callbacks#process_action'

activesupport (8.0.5) lib/active_support/callbacks.rb:120:in 'block in ActiveSupport::Callbacks#run_callbacks'

plugins/discourse-staff-alias/lib/discourse_staff_alias/posts_controller_extension.rb:26:in 'block (2 levels) in <module:PostsControllerExtension>'

activesupport (8.0.5) lib/active_support/callbacks.rb:129:in 'BasicObject#instance_exec'

activesupport (8.0.5) lib/active_support/callbacks.rb:129:in 'block in ActiveSupport::Callbacks#run_callbacks'

app/controllers/application_controller.rb:442:in 'block in ApplicationController#with_resolved_locale'

i18n (1.14.8) lib/i18n.rb:354:in 'I18n::Base#with_locale'

app/controllers/application_controller.rb:442:in 'ApplicationController#with_resolved_locale'

activesupport (8.0.5) lib/active_support/callbacks.rb:129:in 'block in ActiveSupport::Callbacks#run_callbacks'

app/controllers/application_controller.rb:1098:in 'ApplicationController#ensure_dont_cache_page'

activesupport (8.0.5) lib/active_support/callbacks.rb:129:in 'block in ActiveSupport::Callbacks#run_callbacks'

activesupport (8.0.5) lib/active_support/callbacks.rb:140:in 'ActiveSupport::Callbacks#run_callbacks'

actionpack (8.0.5) lib/abstract_controller/callbacks.rb:260:in 'AbstractController::Callbacks#process_action'

actionpack (8.0.5) lib/action_controller/metal/rescue.rb:27:in 'ActionController::Rescue#process_action'

actionpack (8.0.5) lib/action_controller/metal/instrumentation.rb:76:in 'block in ActionController::Instrumentation#process_action'

activesupport (8.0.5) lib/active_support/notifications.rb:210:in 'block in ActiveSupport::Notifications.instrument'

activesupport (8.0.5) lib/active_support/notifications/instrumenter.rb:58:in 'ActiveSupport::Notifications::Instrumenter#instrument'

activesupport (8.0.5) lib/active_support/notifications.rb:210:in 'ActiveSupport::Notifications.instrument'

actionpack (8.0.5) lib/action_controller/metal/instrumentation.rb:75:in 'ActionController::Instrumentation#process_action'

actionpack (8.0.5) lib/action_controller/metal/params_wrapper.rb:259:in 'ActionController::ParamsWrapper#process_action'

activerecord (8.0.5) lib/active_record/railties/controller_runtime.rb:39:in 'ActiveRecord::Railties::ControllerRuntime#process_action'

actionpack (8.0.5) lib/abstract_controller/base.rb:152:in 'AbstractController::Base#process'

actionview (8.0.5) lib/action_view/rendering.rb:40:in 'ActionView::Rendering#process'

rack-mini-profiler (4.0.1) lib/mini_profiler/profiling_methods.rb:116:in 'block in ActionController::Base#profile_method'[ ](https://github.com/rack/rack/blob/master/mini_profiler/profiling_methods.rb#L116)

actionpack (8.0.5) lib/action_controller/metal.rb:252:in 'ActionController::Metal#dispatch'

actionpack (8.0.5) lib/action_controller/metal.rb:335:in 'ActionController::Metal.dispatch'

actionpack (8.0.5) lib/action_dispatch/routing/route_set.rb:67:in 'ActionDispatch::Routing::RouteSet::Dispatcher#dispatch'

actionpack (8.0.5) lib/action_dispatch/routing/route_set.rb:50:in 'ActionDispatch::Routing::RouteSet::Dispatcher#serve'

actionpack (8.0.5) lib/action_dispatch/journey/router.rb:53:in 'block in ActionDispatch::Journey::Router#serve'

actionpack (8.0.5) lib/action_dispatch/journey/router.rb:133:in 'block in ActionDispatch::Journey::Router#find_routes'

actionpack (8.0.5) lib/action_dispatch/journey/router.rb:126:in 'Array#each'

actionpack (8.0.5) lib/action_dispatch/journey/router.rb:126:in 'ActionDispatch::Journey::Router#find_routes'

actionpack (8.0.5) lib/action_dispatch/journey/router.rb:34:in 'ActionDispatch::Journey::Router#serve'

actionpack (8.0.5) lib/action_dispatch/routing/route_set.rb:908:in 'ActionDispatch::Routing::RouteSet#call'

lib/middleware/omniauth_bypass_middleware.rb:35:in 'Middleware::OmniauthBypassMiddleware#call'

lib/middleware/crawler_hooks.rb:13:in 'Middleware::CrawlerHooks#call'

rack (2.2.23) lib/rack/tempfile_reaper.rb:15:in 'Rack::TempfileReaper#call'

rack (2.2.23) lib/rack/conditional_get.rb:40:in 'Rack::ConditionalGet#call'

rack (2.2.23) lib/rack/head.rb:12:in 'Rack::Head#call'
2 „Gefällt mir“

Hmm. Ich vermute, der neueste Update hat etwas kaputt gemacht. Ich bin mir nicht sicher, ob die Person, für die ich es erstellt habe, es noch benutzt oder ein Budget hat, um es zu reparieren. Wenn ich von ihm höre, werde ich es reparieren.

Du bist herzlich eingeladen, einen PR einzureichen.

Ich sehe das auch:


7
ArgumentError (unknown keyword: :private_message_context) lib/plugin/instance.rb:460:in 'Kernel#public_send' lib/plugin/instance.rb:460:in 'block (2 levels) in Guardian#add_to_class' lib/topic_creator
6:52 am
7
Failed to handle exception in exception app middleware : ArgumentError : unknown keyword: :private_message_context
6:52 am

Plugin deaktivieren und PMs neu aufbauen

Von niemandem, der einen PR eingereicht hat, oder vom Kunden, der für die Erstellung bezahlt hat, habe ich nichts gehört, also habe ich mir keine Zeit genommen, das zu untersuchen. Ich werde mich das vielleicht nächste Woche ansehen.

1 „Gefällt mir“

Ich habe dir eine E-Mail dazu geschickt

Vielen Dank an @pmcpa für die Unterstützung bei den notwendigen Updates. Ich habe das Problem behoben, das durch Änderungen am Kerncode entstanden war, und zudem das Skelett sowie die Linting-Konfiguration auf die aktuellen Versionen aktualisiert. Außerdem habe ich die Tests aktualisiert und einige fehlende Tests hinzugefügt.

Ich verwende das Projekt selbst nicht, also lass mich bitte wissen, wenn es bei dir funktioniert! (Vielleicht einfach ein :100: oder einen dieser neuen Boosts).

2 „Gefällt mir“

Das Update scheint funktioniert zu haben, danke!

2 „Gefällt mir“

Ich habe das Addon gerade wieder aktiviert und festgestellt, dass die PN-Funktion weiterhin/erneut funktioniert. :slight_smile: Also ein riesiges Dankeschön! :smiley:

3 „Gefällt mir“