يظهر الخطأ 'undefined method `kilobytes’ for “1024”:String’ عند تثبيت مكون الثيم

أواجه خطأ 500 عند محاولة تثبيت مكون السمة هذا من git وإذا قمت بتحميل ملف مضغوط، فهناك

SyntaxError: Unexpected token ‘<’, "<!DOCTYPE "… is not valid JSON

إعجابَين (2)

هل اتبعت الدليل، باستخدام عنوان URL هذا https://github.com/discourse/DiscoTOC وتثبيته هنا هكذا؟

3 إعجابات

لقد فعلت هذا ويعطي خطأ 500 كما ذكرت، لقد حاولت فقط فك الضغط من جهازك بعد ذلك وحصلت على الخطأ الثاني بشأن بناء الجملة. إذا كان لديك مثبتًا، هل يمكنك محاولة إزالته وإضافته مرة أخرى حتى تتمكن من تكرار المشكلة بنفسك.

إعجابَين (2)

لا أرى أي مشكلة من جهتي.

هل يمكنك تثبيت مكونات سمات أخرى أم هذا المكون فقط؟

أيضًا، هل يمكنك التحقق من \u003cyour_forum_url\u003e/logs إذا كنت ترى أي خطأ ذي صلة؟

إعجابَين (2)

نعم أستطيع ولدي مكونات أخرى مثبتة.
يعرض سجل الأخطاء

فشل في معالجة الاستجابة المختطفة بشكل صحيح : NoMethodError : الطريقة غير المعرفة `kilobytes’ لـ “1024”:String

/var/www/discourse/lib/validators/upload_validator.rb:152:in `maximum_file_size' 
/var/www/discourse/lib/validators/upload_validator.rb:61:in `maximum_image_file_size' 
/var/www/discourse/lib/validators/upload_validator.rb:34:in `validate' 
activesupport-7.0.7/lib/active_support/callbacks.rb:423:in `block in make_lambda' 
activesupport-7.0.7/lib/active_support/callbacks.rb:199:in `block (2 levels) in halting' 
activesupport-7.0.7/lib/active_support/callbacks.rb:687:in `block (2 levels) in default_terminator' 
activesupport-7.0.7/lib/active_support/callbacks.rb:686:in `catch' 
activesupport-7.0.7/lib/active_support/callbacks.rb:686:in `block in default_terminator' 
activesupport-7.0.7/lib/active_support/callbacks.rb:200:in `block in halting' 
activesupport-7.0.7/lib/active_support/callbacks.rb:595:in `block in invoke_before' 
activesupport-7.0.7/lib/active_support/callbacks.rb:595:in `each' 
activesupport-7.0.7/lib/active_support/callbacks.rb:595:in `invoke_before' 
activesupport-7.0.7/lib/active_support/callbacks.rb:106:in `run_callbacks' 
activesupport-7.0.7/lib/active_support/callbacks.rb:929:in `_run_validate_callbacks' 
activemodel-7.0.7/lib/active_model/validations.rb:406:in `run_validations!' 
activemodel-7.0.7/lib/active_model/validations/callbacks.rb:115:in `block in run_validations!' 
activesupport-7.0.7/lib/active_support/callbacks.rb:107:in `run_callbacks' 
activesupport-7.0.7/lib/active_support/callbacks.rb:929:in `_run_validation_callbacks' 
activemodel-7.0.7/lib/active_model/validations/callbacks.rb:115:in `run_validations!' 
activemodel-7.0.7/lib/active_model/validations.rb:337:in `valid?' 
activerecord-7.0.7/lib/active_record/validations.rb:68:in `valid?' 
activerecord-7.0.7/lib/active_record/validations.rb:84:in `perform_validations' 
activerecord-7.0.7/lib/active_record/validations.rb:47:in `save' 
activerecord-7.0.7/lib/active_record/transactions.rb:298:in `block in save' 
activerecord-7.0.7/lib/active_record/transactions.rb:354:in `block in with_transaction_returning_status' 
activerecord-7.0.7/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction' 
activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt' 
activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize' 
activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt' 
activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize' 
activerecord-7.0.7/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction' 
activerecord-7.0.7/lib/active_record/connection_adapters/abstract/database_statements.rb:316:in `transaction' 
activerecord-7.0.7/lib/active_record/transactions.rb:350:in `with_transaction_returning_status' 
activerecord-7.0.7/lib/active_record/transactions.rb:298:in `save' 
activerecord-7.0.7/lib/active_record/suppressor.rb:50:in `save' 
/var/www/discourse/lib/upload_creator.rb:232:in `block in create_for' 
/var/www/discourse/lib/distributed_mutex.rb:53:in `block in synchronize' 
/var/www/discourse/lib/distributed_mutex.rb:49:in `synchronize' 
/var/www/discourse/lib/distributed_mutex.rb:49:in `synchronize' 
/var/www/discourse/lib/distributed_mutex.rb:34:in `synchronize' 
/var/www/discourse/lib/upload_creator.rb:89:in `create_for' 
/var/www/discourse/app/models/remote_theme.rb:249:in `block in update_from_remote' 
/var/www/discourse/app/models/remote_theme.rb:240:in `each' 
/var/www/discourse/app/models/remote_theme.rb:240:in `update_from_remote' 
/var/www/discourse/app/models/remote_theme.rb:167:in `import_theme' 
/var/www/discourse/app/controllers/admin/themes_controller.rb:115:in `block in import' 
/var/www/discourse/lib/hijack.rb:63:in `instance_eval' 
/var/www/discourse/lib/hijack.rb:63:in `block in hijack' 
concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/promises.rb:901:in `callback_on_resolution' 
concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/promises.rb:787:in `call_callback' 
concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/promises.rb:793:in `call_callbacks' 
concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/promises.rb:691:in `resolve_with' 
concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/promises.rb:1315:in `resolve' 
/var/www/discourse/lib/scheduler/defer.rb:107:in `block in do_work' 
rails_multisite-5.0.0/lib/rails_multisite/connection_management.rb:82:in `with_connection'
/var/www/discourse/lib/scheduler/defer.rb:101:in `do_work' 
/var/www/discourse/lib/scheduler/defer.rb:89:in `block (2 levels) in start_thread' 
hostname xxxx
process_id 218
application_version 63b217c2bc6caecc63bdc0a998b0a1ae7234f3d4
HTTP_HOST xxxx
REQUEST_URI /admin/themes/import
REQUEST_METHOD POST
HTTP_USER_AGENT Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
HTTP_ACCEPT /
HTTP_REFERER https://xxxx/admin/customize/themes
HTTP_X_FORWARDED_FOR xxxx
HTTP_X_REAL_IP xxxx
username xxxx
time 8:50 am
params
remote GitHub - discourse/DiscoTOC: A Discourse theme component that generates a table of contents for topics with one click
إعجابَين (2)

أرى مشكلتك! :slight_smile:

كان هناك في الواقع إصلاح حديث لذلك:

إذا قمت بتحديث Discourse، فسيؤدي ذلك إلى حل مشكلتك.

6 إعجابات

مرحباً، شكراً لك، لقد قمت للتو بتحديث discourse وتم حل المشكلة.

5 إعجابات

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.