The discussion addresses a bug where moving a solved topic to a category that disallows solutions failed to remove the “solved” status. codinghorror initially reported the issue, noting that topics moved out of categories with solutions retained their solved markers. sam agreed to the cleanup, and bekicot submitted a PR adding a plugin hook to handle category changes. tgxworld suggested using a model callback instead of a new event trigger. fhe and nildarar confirmed the issue persisted, explaining that admins could not uncheck the solution after moving the topic to an incompatible category. lindsey initially claimed a fix was in place, but Moin clarified that the previous fix only addressed moving individual posts, not entire topics. lindsey acknowledged the misunderstanding and lindsey committed to fixing the topic-level issue. Finally, lindsey confirmed the behavior was updated: when a solved topic is moved to a category without solution support, the accepted solution is automatically removed, and admins receive a notification before the move is completed.
I was just curious but is it possible to avoid adding a DiscourseEvent trigger and just add a model callback which checks when the category_id has been changed?
عندما يتم تحديد أحد الردود بشكل غير صحيح على أنه الإجابة الصحيحة، يرى المدير أن التصنيف خاطئ وينقل الموضوع إلى تصنيف آخر. لا يزال الرد المحدد معروضًا كإجابة صحيحة، حتى لو لم تكن هذه الميزة مفعلة في التصنيف الجديد.
في هذه الحالات، لا يمكن للمدير إلغاء الرد المحدد. يجب تغيير التصنيف إلى التصنيف الذي تكون فيه هذه الميزة مفعلة. ثم إلغاء الإجابة الصحيحة وتغيير التصنيف مرة أخرى.
سيكون الأمر أسهل قليلاً إذا كان بإمكان المديرين إلغاء الإجابة الصحيحة في جميع التصنيفات (حتى تلك التي تكون فيها هذه الميزة معطلة).
لقد عالجنا هذا الأمر من خلال ضمان أنه إذا تم نقل مشاركة الحل خارج الموضوع، يعود الموضوع إلى حالة غير محلولة.
يتم إخطار المستخدم الذي ينقل مشاركة الحل بالتأثير قبل إكمال إجراء النقل:
لقد قمنا بتحديث هذا السلوك بحيث عند نقل موضوع تم حله إلى فئة لا تدعم الحلول، ستتم إزالة الحل المقبول من الموضوع. سنقوم بإخطار المسؤولين بذلك قبل إتمام النقل: