خطأ 500 عند تفعيل الإضافات (لم يتم العثور على الأصل في مسار التحميل.)

مرحبًا،

كلما قمت بتنشيط أي إضافة، يتعطل الموقع مع رمز خطأ 500، مما يضطرني إلى إلغاء تنشيط الإضافة مرة أخرى.

يظهر السجل في /logs ما يلي: ActionView::Template::Error (لم يتم العثور على الأصل 'plugins/discourse-translator.js' في مسار التحميل.) lib/freedom_patches/propshaft_patches.rb:16:in 'compute_asset_path' app/helpers/application_he

propshaft (1.3.1) lib/propshaft/helper.rb:50:in 'Propshaft::Helper#compute_asset_path'
lib/freedom_patches/propshaft_patches.rb:16:in 'compute_asset_path'
actionview (8.0.4) lib/action_view/helpers/asset_url_helper.rb:204:in 'ActionView::Helpers::AssetUrlHelper#asset_path'
app/helpers/application_helper.rb:94:in 'ApplicationHelper#script_asset_path'
app/helpers/application_helper.rb:144:in 'block in ApplicationHelper#preload_script'
app/helpers/application_helper.rb:143:in 'Array#map'
app/helpers/application_helper.rb:143:in 'ApplicationHelper#preload_script'
app/views/layouts/application.html.erb:51
app/views/layouts/application.html.erb:50:in 'Array#each'
app/views/layouts/application.html.erb:50
actionview (8.0.4) lib/action_view/base.rb:278:in 'Kernel#public_send'
actionview (8.0.4) lib/action_view/base.rb:278:in 'ActionView::Base#_run'
actionview (8.0.4) lib/action_view/template.rb:284:in 'block in ActionView::Template#render'
activesupport (8.0.4) lib/active_support/notifications.rb:212:in 'ActiveSupport::Notifications.instrument'
actionview (8.0.4) lib/action_view/template.rb:583:in 'ActionView::Template#instrument_render_template'
actionview (8.0.4) lib/action_view/template.rb:272:in 'ActionView::Template#render'
rack-mini-profiler (4.0.1) lib/mini_profiler/profiling_methods.rb:90:in 'block in ActionView::Template#profile_method'
actionview (8.0.4) lib/action_view/renderer/template_renderer.rb:77:in 'block in ActionView::TemplateRenderer#render_with_layout'
activesupport (8.0.4) lib/active_support/notifications.rb:210:in 'block in ActiveSupport::Notifications.instrument'
activesupport (8.0.4) lib/active_support/notifications/instrumenter.rb:58:in 'ActiveSupport::Notifications::Instrumenter#instrument'
activesupport (8.0.4) lib/active_support/notifications.rb:210:in 'ActiveSupport::Notifications.instrument'
actionview (8.0.4) lib/action_view/renderer/template_renderer.rb:75:in 'ActionView::TemplateRenderer#render_with_layout'
actionview (8.0.4) lib/action_view/renderer/template_renderer.rb:59:in 'ActionView::TemplateRenderer#render_template'
actionview (8.0.4) lib/action_view/renderer/template_renderer.rb:11:in 'ActionView::TemplateRenderer#render'
actionview (8.0.4) lib/action_view/renderer/renderer.rb:58:in 'ActionView::Renderer#render_template_to_object'
actionview (8.0.4) lib/action_view/renderer/renderer.rb:31:in 'ActionView::Renderer#render_to_object'
actionview (8.0.4) lib/action_view/rendering.rb:136:in 'block in ActionView::Rendering#_render_template'
actionview (8.0.4) lib/action_view/base.rb:305:in 'ActionView::Base#in_rendering_context'
actionview (8.0.4) lib/action_view/rendering.rb:135:in 'ActionView::Rendering#_render_template'
actionpack (8.0.4) lib/action_controller/metal/streaming.rb:179:in 'ActionController::Streaming#_render_template'
actionview (8.0.4) lib/action_view/rendering.rb:122:in 'ActionView::Rendering#render_to_body'
actionpack (8.0.4) lib/action_controller/metal/rendering.rb:186:in 'ActionController::Rendering#render_to_body'
actionpack (8.0.4) lib/action_controller/metal/renderers.rb:140:in 'ActionController::Renderers#render_to_body'
actionpack (8.0.4) lib/abstract_controller/rendering.rb:28:in 'AbstractController::Rendering#render'
actionpack (8.0.4) lib/action_controller/metal/rendering.rb:167:in 'ActionController::Rendering#render'
actionpack (8.0.4) lib/action_controller/metal/instrumentation.rb:31:in 'block (2 levels) in ActionController::Instrumentation#render'
activesupport (8.0.4) lib/active_support/benchmark.rb:17:in 'ActiveSupport::Benchmark.realtime'
actionpack (8.0.4) lib/action_controller/metal/instrumentation.rb:31:in 'block in ActionController::Instrumentation#render'
actionpack (8.0.4) lib/action_controller/metal/instrumentation.rb:100:in 'ActionController::Instrumentation#cleanup_view_runtime'
activerecord (8.0.4) lib/active_record/railties/controller_runtime.rb:46:in 'ActiveRecord::Railties::ControllerRuntime#cleanup_view_runtime'
actionpack (8.0.4) lib/action_controller/metal/instrumentation.rb:30:in 'ActionController::Instrumentation#render'
app/controllers/categories_controller.rb:75:in 'block (2 levels) in CategoriesController#index'
actionpack (8.0.4) lib/action_controller/metal/mime_responds.rb:224:in 'ActionController::MimeResponds#respond_to'
app/controllers/categories_controller.rb:50:in 'CategoriesController#index'
actionpack (8.0.4) lib/action_controller/metal/basic_implicit_render.rb:8:in 'ActionController::BasicImplicitRender#send_action'
actionpack (8.0.4) lib/abstract_controller/base.rb:215:in 'AbstractController::Base#process_action'
actionpack (8.0.4) lib/action_controller/metal/rendering.rb:193:in 'ActionController::Rendering#process_action'
actionpack (8.0.4) lib/abstract_controller/callbacks.rb:261:in 'block in AbstractController::Callbacks#process_action'
activesupport (8.0.4) lib/active_support/callbacks.rb:120:in 'block in ActiveSupport::Callbacks#run_callbacks'
app/controllers/application_controller.rb:442:in 'block in ApplicationController#with_resolved_locale'
i18n (1.14.7) lib/i18n.rb:353:in 'I18n::Base#with_locale'
app/controllers/application_controller.rb:442:in 'ApplicationController#with_resolved_locale'
activesupport (8.0.4) lib/active_support/callbacks.rb:129:in 'block in ActiveSupport::Callbacks#run_callbacks'
app/controllers/application_controller.rb:1088:in 'ApplicationController#ensure_dont_cache_page'
activesupport (8.0.4) lib/active_support/callbacks.rb:129:in 'block in ActiveSupport::Callbacks#run_callbacks'
activesupport (8.0.4) lib/active_support/callbacks.rb:140:in 'ActiveSupport::Callbacks#run_callbacks'
actionpack (8.0.4) lib/abstract_controller/callbacks.rb:260:in 'AbstractController::Callbacks#process_action'
actionpack (8.0.4) lib/action_controller/metal/rescue.rb:27:in 'ActionController::Rescue#process_action'
actionpack (8.0.4) lib/action_controller/metal/instrumentation.rb:76:in 'block in ActionController::Instrumentation#process_action'
activesupport (8.0.4) lib/active_support/notifications.rb:210:in 'block in ActiveSupport::Notifications.instrument'
activesupport (8.0.4) lib/active_support/notifications/instrumenter.rb:58:in 'ActiveSupport::Notifications::Instrumenter#instrument'
activesupport (8.0.4) lib/active_support/notifications.rb:210:in 'ActiveSupport::Notifications.instrument'
actionpack (8.0.4) lib/action_controller/metal/instrumentation.rb:75:in 'ActionController::Instrumentation#process_action'
actionpack (8.0.4) lib/action_controller/metal/params_wrapper.rb:259:in 'ActionController::ParamsWrapper#process_action'
activerecord (8.0.4) lib/active_record/railties/controller_runtime.rb:39:in 'ActiveRecord::Railties::ControllerRuntime#process_action'
actionpack (8.0.4) lib/abstract_controller/base.rb:152:in 'AbstractController::Base#process'
actionview (8.0.4) 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.4) lib/action_controller/metal.rb:252:in 'ActionController::Metal#dispatch'
actionpack (8.0.4) lib/action_controller/metal.rb:335:in 'ActionController::Metal.dispatch'
actionpack (8.0.4) lib/action_dispatch/routing/route_set.rb:67:in 'ActionDispatch::Routing::RouteSet::Dispatcher#dispatch'
actionpack (8.0.4) lib/action_dispatch/routing/route_set.rb:50:in 'ActionDispatch::Routing::RouteSet::Dispatcher#serve'
actionpack (8.0.4) lib/action_dispatch/routing/mapper.rb:32:in 'block in <class:Constraints>'
actionpack (8.0.4) lib/action_dispatch/routing/mapper.rb:62:in 'ActionDispatch::Routing::Mapper::Constraints#serve'
actionpack (8.0.4) lib/action_dispatch/journey/route

يحدث هذا مع:

فشل بعض الإضافات القديمة للمجتمع قد يوحي بأنها قديمة جدًا، لكن فشل discourse-translator يشير أكثر إلى مشكلة في أن الإضافات والأصول “خاطئة”. هذه الإضافات هي الإضافات الوحيدة غير المثبتة مسبقًا، لذا فهي مشكلة عامة “لا يمكنني تثبيت الإضافات”.

صنفتها على أنها unsupported-install، لأنني أستخدم صورة docker الخاصة بـ discourse/discourse:2026.1.1 (esr)، والتي تعمل بشكل مثالي باستثناء مشكلة الإضافة هذه. قمت بربط حجم docker بمجلد الإضافات (- plugins:/var/www/discourse/plugins). قمت بتثبيت الإضافات عبر rake plugin:install[https://github.com/…]

تخبرني رسالة الخطأ بوجود أصل مفقود، وهو موجود بالفعل (انظر أدناه). ربما هناك أمر rake مفقود؟

لقد نفذت أمر db:migrate (لا تحتوي أي من الإضافات على جداول إضافية) وأيضًا rake assets:precompile (وهو ما يتم تنفيذه أيضًا عند إعادة تشغيل الحاوية، وقد تم ذلك عدة مرات بالفعل). تظهر السجلات أن discourse-translator و discourse-prevent-posting تم تجميعهما مسبقًا، بينما لم يتم تجميع scheduled-readonly لأنه لا يحتوي على أصول (لكنه يفشل على أي حال لأن ملف .js الخاص به غير موجود في مسار تحميل الأصول؟)

يظهر ما يلي أن discourse-translator تم تجميعه مسبقًا ويجب أن يكون في الأماكن الصحيحة، أعتقد؟ هل هناك أي تلميحات حول ما يمكنني البحث فيه بعد ذلك؟

discourse@59c1450786e0:/var/www/discourse$ find . -type f -name "*discourse-translator*"
./frontend/discourse/dist/assets/plugins/discourse-translator.map
./frontend/discourse/dist/assets/plugins/discourse-translator.js
./public/assets/plugins/discourse-translator-528f7bc3.js.gz
./public/assets/plugins/discourse-translator-528f7bc3.js.br
./public/assets/plugins/discourse-translator-528f7bc3.js
./public/assets/plugins/discourse-translator-62208e74.map
./tmp/stylesheet-cache/discourse-translator_rtl_66ab73aaa7b3ab50cd6f88921264d7933487aa18.css
./tmp/stylesheet-cache/discourse-translator_66ab73aaa7b3ab50cd6f88921264d7933487aa18.css
./tmp/stylesheet-cache/discourse-translator_cc99d90d66ec528a261e18f38cdc144b5ecfddc7.css.map
./tmp/stylesheet-cache/discourse-translator_rtl_cc99d90d66ec528a261e18f38cdc144b5ecfddc7.css
./tmp/stylesheet-cache/discourse-translator_66ab73aaa7b3ab50cd6f88921264d7933487aa18.css.map
./tmp/stylesheet-cache/discourse-translator_cc99d90d66ec528a261e18f38cdc144b5ecfddc7.css

رهاني هو أن إضافة المترجم إما معطلة أو لا ينبغي استخدامها بعد الآن :man_shrugging: ألا يجب استخدامها في app.yml؟

نحن نستخدم هذه المكونات الإضافية لبعض عملائنا. إنها تعمل بالتأكيد على 2026.1.1.

نفس الشيء: المكون الإضافي للمترجم يعمل على 2026.1.1.

لا أستبعد هذا كسبب.

بخصوص وحدة التخزين.

وحدة التخزين مخصصة فقط للتخزين (المستمر) لبيانات المكونات الإضافية (مستودعات Git) وليس لها علاقة بالمسارات التي توجد فيها الأصول المترجمة.
لكنني اختبرت المشكلة دون استخدام وحدة تخزين للمكونات الإضافية، ولا تزال المشكلة قائمة.

من الجيد أيضًا أن نسمع أن المكونات الإضافية لـ communiteq “انتهت” وتعمل، ولهذا السبب لا تحتاج إلى التزامات (commits) جديدة :slight_smile: