Lorsque j’active les réponses imbriquées et le vote sur les messages, puis que je convertis un message en vue à réponses imbriquées, j’obtiens une erreur 500.
NoMethodError (méthode undefined 'post_number' pour nil) lib/nested_replies/post_tree_serializer.rb:88:in 'NestedReplies::PostTreeSerializer#topic_view_json' lib/nested_replies/post_tree_serializer.rb:2
NoMethodError (méthode undefined 'post_number' pour nil)
lib/nested_replies/post_tree_serializer.rb:88:in 'NestedReplies::PostTreeSerializer#topic_view_json'
lib/nested_replies/post_tree_serializer.rb:20:in 'NestedReplies::PostTreeSerializer#serialize_topic'
app/services/nested_topic/list_roots.rb:124:in 'NestedTopic::ListRoots#enrich_with_topic_metadata'
lib/service/base/step.rb:43:in 'BasicObject#instance_exec'
lib/service/base/step.rb:43:in 'Service::Base::Step#run_step'
lib/service/base/step.rb:21:in 'block in Service::Base::Step#call'
lib/service/base/step.rb:52:in 'Service::Base::Step#with_runtime'
lib/service/base/step.rb:21:in 'Service::Base::Step#call'
lib/service/base/only_if_step.rb:19:in 'block in Service::Base::OnlyIfStep#run_step'
lib/service/base/only_if_step.rb:19:in 'Array#each'
lib/service/base/only_if_step.rb:19:in 'Service::Base::OnlyIfStep#run_step'
lib/service/base/step.rb:21:in 'block in Service::Base::Step#call'
lib/service/base/step.rb:52:in 'Service::Base::Step#with_runtime'
lib/service/base/step.rb:21:in 'Service::Base::Step#call'
lib/service/base.rb:260:in 'block in Service::Base#run!'
lib/service/base.rb:260:in 'Array#each'
lib/service/base.rb:260:in 'Service::Base#run!'
lib/service/base.rb:253:in 'Service::Base#run'
lib/service/base.rb:226:in 'Service::Base::ClassMethods#call'
lib/service/runner.rb:152:in 'Service::Runner#result'
lib/service/runner.rb:137:in 'Service::Runner#call'
lib/service/runner.rb:132:in 'Service::Runner.call'
lib/service/base.rb:227:in 'Service::Base::ClassMethods#call'
app/controllers/nested_topics_controller.rb:146:in 'NestedTopicsController#list_roots_response'
app/controllers/nested_topics_controller.rb:23:in 'NestedTopicsController#show'
app/controllers/application_controller.rb:452:in 'block in ApplicationController#with_resolved_locale'
app/controllers/application_controller.rb:452:in 'ApplicationController#with_resolved_locale'
app/controllers/application_controller.rb:1101:in 'ApplicationController#ensure_d...
plugins/discourse-post-voting/extensions/topic_view_extension.rb:88:in 'PostVoting::TopicViewExtension#next_page'
plugins/discourse-ai/lib/embeddings/entry_point.rb:41:in 'block (2 levels) in TopicViewSerializer#inject_into'
(eval at active_model_serializers-0.8.4/lib/active_model/serializer.rb:467):89:in 'TopicViewSerializer#_fast_attributes'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:468:in 'ActiveModel::Serializer#attributes'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:480:in 'ActiveModel::Serializer#_serializable_hash'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:359:in 'ActiveModel::Serializer#serializable_hash'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:347:in 'ActiveModel::Serializer#as_json'
lib/nested_replies/post_tree_serializer.rb:88:in 'NestedReplies::PostTreeSerializer#topic_view_json'
lib/nested_replies/post_tree_serializer.rb:20:in 'NestedReplies::PostTreeSerializer#serialize_topic'
app/services/nested_topic/list_roots.rb:124:in 'NestedTopic::ListRoots#enrich_with_topic_metadata'
lib/service/base/step.rb:43:in 'BasicObject#instance_exec'
lib/service/base/step.rb:43:in 'Service::Base::Step#run_step'
lib/service/base/step.rb:21:in 'block in Service::Base::Step#call'
lib/service/base/step.rb:52:in 'Service::Base::Step#with_runtime'
lib/service/base/step.rb:21:in 'Service::Base::Step#call'
lib/service/base/only_if_step.rb:19:in 'block in Service::Base::OnlyIfStep#run_step'
lib/service/base/only_if_step.rb:19:in 'Array#each'
lib/service/base/only_if_step.rb:19:in 'Service::Base::OnlyIfStep#run_step'
lib/service/base/step.rb:21:in 'block in Service::Base::Step#call'
lib/service/base/step.rb:52:in 'Service::Base::Step#with_runtime'
lib/service/base/step.rb:21:in 'Service::Base::Step#call'
lib/service/base.rb:260:in 'block in Service::Base#run!'
lib/service/base.rb:260:in 'Array#each'
lib/service/base.rb:260:in 'Service::Base#run!'
lib/service/base.rb:253:in 'Service::Base#run'
<internal:kernel>:91:in 'Kernel#tap'
lib/service/base.rb:226:in 'Service::Base::ClassMethods#call'
lib/service/runner.rb:152:in 'Service::Runner#result'
lib/service/runner.rb:137:in 'Service::Runner#call'
lib/service/runner.rb:132:in 'Service::Runner.call'
lib/service/base.rb:227:in 'Service::Base::ClassMethods#call'
app/controllers/nested_topics_controller.rb:146:in 'NestedTopicsController#list_roots_response'
app/controllers/nested_topics_controller.rb:23:in 'NestedTopicsController#show'
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'
app/controllers/application_controller.rb:452: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:452: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:1101: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:90:in 'block in ActionController::Base#profile_method'
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:27:in 'Rack::ConditionalGet#call'
rack (2.2.23) lib/rack/head.rb:12:in 'Rack::Head#call'
actionpack (8.0.5) lib/action_dispatch/http/permissions_policy.rb:38:in 'ActionDispatch::PermissionsPolicy::Middleware#call'
lib/content_security_policy/middleware.rb:12:in 'ContentSecurityPolicy::Middleware#call'
lib/middleware/anonymous_cache.rb:417:in 'Middleware::AnonymousCache#call'
lib/middleware/csp_script_nonce_injector.rb:12:in 'Middleware::CspScriptNonceInjector#call'
lib/middleware/track_view_session_id_injector.rb:12:in 'Middleware::TrackViewSessionIdInjector#call'
config/initializers/008-rack-cors.rb:26:in 'Discourse::Cors#call'
rack (2.2.23) lib/rack/session/abstract/id.rb:266:in 'Rack::Session::Abstract::Persisted#context'
rack (2.2.23) lib/rack/session/abstract/id.rb:260:in 'Rack::Session::Abstract::Persisted#call'
actionpack (8.0.5) lib/action_dispatch/middleware/cookies.rb:706:in 'ActionDispatch::Cookies#call'
actionpack (8.0.5) lib/action_dispatch/middleware/callbacks.rb:31:in 'block in ActionDispatch::Callbacks#call'
activesupport (8.0.5) lib/active_support/callbacks.rb:100:in 'ActiveSupport::Callbacks#run_callbacks'
actionpack (8.0.5) lib/action_dispatch/middleware/callbacks.rb:30:in 'ActionDi