cwhatley
(Chris Whatley)
2 أكتوبر 2022، 6:56م
1
أنا أستضيف ذاتيًا باستخدام دوكر وأقوم بالتحديث من فرع tests-passed.
تم التحديث إلى الالتزام التالي - ff42bef1b6 - والذي يتضمن PR التالي:
main ← general-default
opened 05:33PM - 27 Sep 22 UTC
This change will auto select the General category in the composer when a new top… ic is created. As part of this change it will remove the option to de-select the category from the composer when the allow uncategorized site setting is disabled (you can still switch categories in the composer, but will not be allowed to leave the category field blank). This means that a user will no-longer receive the "you must select a category" message when submitting a topic because they will always have one selected.
There is a migration that will only trigger for *new* sites for setting the `allow_uncategorized_topics` site setting to false so that it is now disabled by default. This change initially broke many tests because we don't currently seed the general category and most of the tests were written assuming that uncategorized topics were allowed. I made the necessary changes to get the tests to pass, but I think there will be a refactoring that will need to take place in the future where we seed the General category in the test env so that helpers like `create_post` use the General category instead of falling back to uncategorized.
بعد التثبيت، لم يتمكن المستخدمون من فتح منشئ الموضوع الجديد إما بالنقر فوق “+ موضوع جديد” أو زيارة /new-topic مباشرة.
خطأ جافاسكريبت في وحدة التحكم:
TypeError: undefined is not an object (evaluating 'category.topic_template')
شككت في أن الكود الموجود في PR قد يكون هو المشكلة ودخلت إلى وحدة تحكم rails وقمت بتنفيذ ما يلي لتعيين الفئة العامة إلى إحدى فئاتنا الموجودة:
SiteSetting.general_category_id=5
هذا أصلح المشكلة. القيمة السابقة كانت -1.
أعتقد أن استخدام قيمة افتراضية nil لـ general_cateogory_id سيصلح هذه المشكلة.
5 إعجابات
pfaffman
(Jay Pfaffman)
2 أكتوبر 2022، 7:47م
2
كم عمر تثبيتك؟
هل كان لديك فئة باسم “عام” قمت بإنشائها، أم تم إنشاؤها تلقائيًا؟
إعجابَين (2)
cwhatley
(Chris Whatley)
2 أكتوبر 2022، 8:04م
4
تركيبنا عمره حوالي 18 شهرًا، لكننا محدثون بفرع tests-passed.
ليس لدينا فئة “عامة” على الإطلاق.
إعجابَين (2)
مع فئة عامة commit ، يرى المستخدمون في منتداي الآن عند النقر فوق جديد:
صندوق الفئة فارغ لأنه لا توجد فئة
#general، وتم تعطيل
Uncategorized .
عند محاولة إنشاء موضوع أحصل على هذا
3 إعجابات
Don
3 أكتوبر 2022، 5:04ص
6
نفس الشيء هنا. كان على المستخدمين اختيار فئة قبل أن يتمكنوا من الكتابة. الآن قمت بتثبيت Default Composer Category component بينما يأتي الإصلاح، لذلك لن تكون الفئة فارغة عند فتح المنشئ.
4 إعجابات
blake
(Blake Erickson)
3 أكتوبر 2022، 6:58م
10
حسنًا، تم دمج إصلاح لهذا!
committed 06:19PM - 03 Oct 22 UTC
* FIX: New general category changes preventing topic create
Follow up to: #18… 383
The logic in the previous commit was checking for null, but we are
seeding the SiteSetting.general_category_id with an id of -1 so we need
to check for a positive value as well as checking for null.
See: https://meta.discourse.org/t/240661
* Add js test for presence of category… dropdown option
9 إعجابات