الترقية من 1.6.0 إلى 3

مرحباً بالجميع،

أحاول ترقية تثبيت Discourse القديم الخاص بي من 1.6.0 إلى أحدث إصدار.
لقد قمت بإنشاء خادم تطوير محلي، وتأكدت من أنه يعمل، ثم استعدت نسخة 1.6.0 الاحتياطية عليه.
بعد اكتمال الاستعادة، أصبح موقعي معطلاً بعض الشيء،
تبدأ جميع العناوين في منطقة المسؤول بـ “en.admin.”
وحدة التحكم مليئة بالأخطاء أيضاً.
لا يمكنني إصلاحه ولست متأكداً مما هو الخطأ.



إعجاب واحد (1)

سأقوم بالاستعادة إلى إعداد إنتاجي. التطوير صعب الإعداد بشكل صحيح، ولن تقوم بتشغيل موقعك في بيئة التطوير.

هل لديك أي سمات مخصصة؟ من المحتمل جدًا أنها معطلة.

إعجابَين (2)

سأجرب قطرة رقمية جديدة من DigitalOcean وأرى ما إذا كان ذلك سيحدث فرقًا

نعم، هناك رؤوس مخصصة وما إلى ذلك.
ربما يجب أن أقوم بتعطيل كل هذه قبل النسخ الاحتياطي؟

إعجابَين (2)

تعطيلها قبل النسخ الاحتياطي فكرة جيدة.

إعجابَين (2)

تمكنت من الاستعادة بنجاح إلى قطرة رقمية جديدة - لم أحتج إلى التخلي عن السمات المخصصة في النهاية.

لقد قمت بتشغيل معظم الأشياء، باستثناء خطأ أراه عندما أحاول تعديل فئة موجودة.

أتلقى خطأ في الخادم أثناء محاولة تحميل /c/xxxx-xxxx-xxxx/find_by_slug.json
خطأ في الرمز 500

لا يمكنني أيضًا إنشاء فئات جديدة - خطأ 500
ولا يمكنني إعادة ترتيب الفئات.

إعجاب واحد (1)

جرب تعيين slug generation method إلى encoded في إعدادات الموقع.

3 إعجابات

لا، حاولت تعيينه على “لا شيء” أيضًا.
لا يزال الخطأ 500 يظهر.

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

إعجاب واحد (1)

في 1.6.0، الطلب المرسل لتعديل فئة هو
show.json?1674060788449
http://discourse.url.com/c/20/show.json?_=1674060788449

في 3.1، يتم استخدام find_by_slug.json
https://discourse.url.com/c/category_name/find_by_slug.json

إعجاب واحد (1)

انتقل إلى /logs وشارك الرسالة وتتبع الأخطاء لتلك الأخطاء هنا.

إعجاب واحد (1)

رسالة خطأ

NoMethodError (undefined method `default_slow_mode_seconds' for #<Category id: 20, name: "Music Tech Discussion", color: "ee6b65", topic_id: 36276, topic_count: 5648, created_at: "2016-02-26 12:31:28.

معلومات

Message (25 copies reported)

NoMethodError (undefined method `default_slow_mode_seconds' for #<Category id: 20, name: "Music Tech Discussion", color: "ee6b65", topic_id: 36276, topic_count: 5648, created_at: "2016-02-26 12:31:28.763958000 +0000", updated_at: "2023-01-18 15:06:21.512625000 +0000", user_id: 12, topics_year: 7, topics_month: 0, topics_week: 0, slug: "music-tech-discussion", description: nil, text_color: "FFFFFF", read_restricted: false, auto_close_hours: nil, post_count: 56980, latest_post_id: 228821, latest_topic_id: 36207, position: 1, parent_category_id: nil, posts_year: 24, posts_month: 0, posts_week: 0, email_in: nil, email_in_allow_strangers: false, topics_day: 0, posts_day: 0, allow_badges: true, name_lower: "music tech discussion", auto_close_based_on_last_post: false, topic_template: "", contains_messages: nil, sort_order: nil, sort_ascending: nil, uploaded_logo_id: nil, uploaded_background_id: nil, topic_featured_link_allowed: true, all_topics_wiki: false, show_subcategory_list: false, num_featured_topics: 1, default_view: nil, subcategory_list_style: "rows_with_featured_topics", default_top_period: "all", mailinglist_mirror: false, minimum_required_tags: 0, navigate_to_first_post_after_read: false, search_priority: 0, allow_global_tags: false, reviewable_by_group_id: nil, read_only_banner: nil, default_list_filter: "all", allow_unlimited_owner_edits_on_first_post: false>
هل تقصد؟ default_scopes)
(eval):53:in `_fast_attributes'
app/controllers/application_controller.rb:523:in `serialize_data'
app/controllers/application_controller.rb:532:in `render_serialized'
app/controllers/categories_controller.rb:284:in `find_by_slug'
app/controllers/application_controller.rb:414:in `block in with_resolved_locale'
app/controllers/application_controller.rb:414:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:74:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:366:in `call'
config/initializers/100-quiet_logge...

Backtrace

activemodel (7.0.4) lib/active_model/attribute_methods.rb:458:in `method_missing'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:99:in `block in attribute'
(eval):53: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.rb:343:in `as_json'
app/controllers/application_controller.rb:523:in `serialize_data'
app/controllers/application_controller.rb:532:in `render_serialized'

Env

HTTP HOSTS: forumstest.xxx.com

Backtrace

activemodel (7.0.4) lib/active_model/attribute_methods.rb:458:in `method_missing'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:99:in `block in attribute'
(eval):53: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.rb:343:in `as_json'
app/controllers/application_controller.rb:523:in `serialize_data'
app/controllers/application_controller.rb:532:in `render_serialized'
app/controllers/categories_controller.rb:284:in `find_by_slug'
actionpack (7.0.4) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
actionpack (7.0.4) lib/abstract_controller/base.rb:215:in `process_action'
actionpack (7.0.4) lib/action_controller/metal/rendering.rb:53:in `process_action'
actionpack (7.0.4) lib/abstract_controller/callbacks.rb:234:in `block in process_action'
activesupport (7.0.4) lib/active_support/callbacks.rb:118:in `block in run_callbacks'
app/controllers/application_controller.rb:414:in `block in with_resolved_locale'
app/controllers/application_controller.rb:414:in `with_resolved_locale'
activesupport (7.0.4) lib/active_support/callbacks.rb:127:in `block in run_callbacks'
activesupport (7.0.4) lib/active_support/callbacks.rb:138:in `run_callbacks'
actionpack (7.0.4) lib/abstract_controller/callbacks.rb:233:in `process_action'
actionpack (7.0.4) lib/action_controller/metal/rescue.rb:22:in `process_action'
actionpack (7.0.4) lib/action_controller/metal/instrumentation.rb:67:in `block in process_action'
activesupport (7.0.4) lib/active_support/notifications.rb:206:in `block in instrument'
activesupport (7.0.4) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (7.0.4) lib/active_support/notifications.rb:206:in `instrument'
actionpack (7.0.4) lib/action_controller/metal/instrumentation.rb:66:in `process_action'
actionpack (7.0.4) lib/action_controller/metal/params_wrapper.rb:259:in `process_action'
activerecord (7.0.4) lib/active_record/railties/controller_runtime.rb:27:in `process_action'
actionpack (7.0.4) lib/abstract_controller/base.rb:151:in `process'
actionview (7.0.4) lib/action_view/rendering.rb:39:in `process'
rack-mini-profiler (3.0.0) lib/mini_profiler/profiling_methods.rb:111:in `block in profile_method'
actionpack (7.0.4) lib/action_controller/metal.rb:188:in `dispatch'
actionpack (7.0.4) lib/action_controller/metal.rb:251:in `dispatch'
actionpack (7.0.4) lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
actionpack (7.0.4) lib/action_dispatch/routing/route_set.rb:32:in `serve'
actionpack (7.0.4) lib/action_dispatch/journey/router.rb:50:in `block in serve'
actionpack (7.0.4) lib/action_dispatch/journey/router.rb:32:in `each'
actionpack (7.0.4) lib/action_dispatch/journey/router.rb:32:in `serve'
actionpack (7.0.4) lib/action_dispatch/routing/route_set.rb:852:in `call'
lib/middleware/omniauth_bypass_middleware.rb:74:in `call'
rack (2.2.6.2) lib/rack/tempfile_reaper.rb:15:in `call'
rack (2.2.6.2) lib/rack/conditional_get.rb:27:in `call'
rack (2.2.6.2) lib/rack/head.rb:12:in `call'
actionpack (7.0.4) lib/action_dispatch/http/permissions_policy.rb:38:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:366:in `call'
rack (2.2.6.2) lib/rack/session/abstract/id.rb:266:in `context'
rack (2.2.6.2) lib/rack/session/abstract/id.rb:260:in `call'
actionpack (7.0.4) lib/action_dispatch/middleware/cookies.rb:696:in `call'
actionpack (7.0.4) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
activesupport (7.0.4) lib/active_support/callbacks.rb:99:in `run_callbacks'
actionpack (7.0.4) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
actionpack (7.0.4) lib/action_dispatch/middleware/debug_exceptions.rb:28:in `call'
actionpack (7.0.4) lib/action_dispatch/middleware/show_exceptions.rb:26:in `call'
logster (2.11.3) lib/logster/middleware/reporter.rb:43:in `call'
railties (7.0.4) lib/rails/rack/logger.rb:40:in `call_app'
railties (7.0.4) lib/rails/rack/logger.rb:27:in `call'
config/initializers/100-quiet_logger.rb:20:in `call'
config/initializers/100-silence_logger.rb:29:in `call'
actionpack (7.0.4) lib/action_dispatch/middleware/remote_ip.rb:93:in `call'
actionpack (7.0.4) lib/action_dispatch/middleware/request_id.rb:26:in `call'
lib/middleware/enforce_hostname.rb:24:in `call'
rack (2.2.6.2) lib/rack/method_override.rb:24:in `call'
actionpack (7.0.4) lib/action_dispatch/middleware/executor.rb:14:in `call'
rack (2.2.6.2) lib/rack/sendfile.rb:110:in `call'
actionpack (7.0.4) lib/action_dispatch/middleware/host_authorization.rb:131:in `call'
rack-mini-profiler (3.0.0) lib/mini_profiler/profiler.rb:393:in `call'
message_bus (4.3.2) lib/message_bus/rack/middleware.rb:60:in `call'
lib/middleware/request_tracker.rb:228:in `call'
railties (7.0.4) lib/rails/engine.rb:530:in `call'
railties (7.0.4) lib/rails/railtie.rb:226:in `public_send'
railties (7.0.4) lib/rails/railtie.rb:226:in `method_missing'
rack (2.2.6.2) lib/rack/urlmap.rb:74:in `block in call'
rack (2.2.6.2) lib/rack/urlmap.rb:58:in `each'
rack (2.2.6.2) lib/rack/urlmap.rb:58:in `call'
unicorn (6.1.0) lib/unicorn/http_server.rb:634:in `process_client'
unicorn (6.1.0) lib/unicorn/http_server.rb:739:in `worker_loop'
unicorn (6.1.0) lib/unicorn/http_server.rb:547:in `spawn_missing_workers'
unicorn (6.1.0) lib/unicorn/http_server.rb:143:in `start'
unicorn (6.1.0) bin/unicorn:128:in `<top (required)>'
vendor/bundle/ruby/3.1.0/bin/unicorn:25:in `load'
vendor/bundle/ruby/3.1.0/bin/unicorn:25:in `<main>'
إعجاب واحد (1)

يبدو أنه يفتقد إلى ترحيل؟ هل يمكنك محاولة إعادة البناء؟

إعجابَين (2)

./launcher rebuild app؟

إعادة البناء الآن، سأقوم بتحديثك بعد قليل

إعجابَين (2)

يبدو أن هذا أصلح الأمر!
شكرا جزيلا لك

3 إعجابات

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