نقل مشاركة واحدة أو عدة مشاركات من موضوع إلى موضوع آخر يقع في فئة أخرى ينتج عنه خطأ http 500. لقد اختبرت باستخدام حساب مشرف وحساب مسؤول، ومع مشاركة واحدة أو عدة مشاركات محددة. مصفوفة أذونات الفئات:
الفئة
المجموعة
الأذونات
المصدر
أي شخص
رؤية
المصدر
group01
رؤية رد إنشاء
الهدف
group01
رؤية رد إنشاء
لاحظ أن لدينا مجموعة أذونات منفصلة للمشرفين والمسؤولين وأفترض أن السبب الجذري هو مشكلة أذونات خادعة بعض الشيء. الأفكار حول كيفية تصحيح الأخطاء مرحب بها
ملاحظة: تم الإبلاغ عن هذا الخطأ عدة مرات سابقًا وكانت هناك بالفعل بعض إصلاحات التعليمات البرمجية. أراه مرة أخرى في نسختنا مع الإصدار الحالي 2026.3.0-latest
إعجاب واحد (1)
هل يوجد أي شيء في الـ console؟
هل يحتوي أي من المشاركات على حل؟
لم أتمكن من العثور على حل من المشاركات القديمة بعد. إليك لقطة الشاشة
تُظهر وحدة التحكم أن 500 تظهر مباشرة بعد طلب POST لـ
https://forum.netzwissen.de/t/1431/move-posts
[HTTP/2 500 60ms]
والذي يجب أن يعادل النقر على الزر الأزرق. أي أفكار حول كيفية تصحيح ذلك بشكل أعمق؟
Moin
5 مارس 2026، 5:37م
4
هل هناك شيء أكثر فائدة في علامة تبويب الشبكة (network tab) في وحدة تحكم المتصفح لديك؟ لقد ساعدني ذلك في شهر يناير في خطأ أثناء نقل المشاركات.
إعجاب واحد (1)
… للأسف لا، على الأقل لا أرى أي شيء مفيد في الاستجابة في ملف har (المضغوط) هذا (انظر الاستجابة التي تلي السطر 165).
forum.netzwissen.de_t_1431_move-posts_Archive \[26-03-05 22-14-18\].har.zip (2.8 كيلوبايت)
لقد أجريت بعض عمليات تصحيح الأخطاء الأعمق. حتى سجل nginx داخل الحاوية لا يعرض أي معلومات مفيدة حول ما يحدث
root@docker5-web-only:/var/log/nginx# tail -f access.log | grep 500
[06/Mar/2026:08:51:45 +0000] "``forum.netzwissen.de``" 10.10.10.21 "POST /t/1431/move-posts HTTP/1.0" "Mozilla/5.0 (X11; Linux x86
_64; rv:148.0) Gecko/20100101 Firefox/148.0" "topics/move_posts" 500 432 "``https://forum.netzwissen.de/t/begehung-quartierszent
rum-mettingen/1431/3" 0.053 0.052 "mainmod" "-" "-" "-" "-" "-" "-"
أفترض أن السبب الجذري يكمن في مكان ما وراء ذلك، على سبيل المثال، في طلب قاعدة البيانات من postgres (نحن نستخدم حاويات منفصلة وخادم postgres مخصص)
للأسف، لا تزال هذه المشكلة غير محلولة وتظهر من حين لآخر، ولكن دون وجود منطق أو شروط مسبقة واضحة وراء ذلك. لذلك، يصعب إعادة إنتاجها.
لقد نظرت مرة أخرى في سجلات nginx لتطبيق الويب، ولا يوجد أي مؤشر على حدوث خطأ HTTP 500 على جانب الخادم الخاص بالمحتويات.
@هناك احتمال بنسبة 55% أن هذا سيُصلح المشكلة
main ← fix/move-posts-tombstoned-collection
merged 07:00PM - 19 Jun 26 UTC
### What
Moving one or more posts into a `full_topic` topic could raise
`Active… Record::RecordNotUnique` and surface to the user as an HTTP 500 — from
core's `TopicsController#move_posts`, which only rescues `RecordInvalid` /
`RecordNotSaved`, so anything else becomes a 500.
Reported on Meta: https://meta.discourse.org/t/error-500-when-moving-posts/397654
### Why
ActivityPub records are hidden once tombstoned, via `IdentifierValidations`'
`default_scope { where.not(ap_type: Tombstone.type) }`. The row still exists,
though, and still occupies the unique `(model_type, model_id)` index
(`unique_activity_pub_collection_models`).
The `:first_post_moved` / `:post_moved` handlers check
`!topic.activity_pub_object` — which the default scope reports as `nil` for a
tombstoned collection — and call `create_activity_pub_collection!`, which
blindly inserts a second collection for the same topic and collides on the
unique index.
It's data-dependent (the destination topic's collection must have been
tombstoned previously, e.g. via a delete/restore cycle), which matches the
intermittent, "no visible preconditions" reports.
### How
`create_activity_pub_collection!` now looks the collection up `unscoped`,
restores it when tombstoned, and reuses it instead of inserting a duplicate.
This makes the method idempotent for all of its callers, and preserves the
collection's `ap_id` (its federation identity) rather than orphaning it.
### Tests
- Adds a regression test for moving posts into a topic whose collection was
tombstoned.
- A second commit simplifies the `move_posts` topic specs — collapsing the
per-scenario example fan-out into one example each, with `:aggregate_failures`
on the group. Same coverage, 38 → 14 examples, roughly half the runtime.
إعجابَين (2)
ممتاز، شكرًا لك. أفترض أن هذا جزء من كود إضافات ActivityPub. لا أتذكر ما إذا كان هذا الإضافة مُضمّنة بالفعل مع الكود الرئيسي (انظر Bundling more popular plugins with Discourse core ). على أي حال، يجب أن تأتي مع التحديث القادم للإصدار/الحاوية، صحيح؟