غير قادر على منح الشارة المخصصة لعدم خلو حقل السبب

مرحبًا، لقد فحصت أحدث إصدارين المستقر 1.9.3+2 و test-passed ولاحظت أنه لا يمكن منح شارة مخصصة للمستخدم إذا كان حقل السبب غير فارغ.

خطوات إعادة إنتاج المشكلة:

  1. إنشاء شارة جديدة بسيطة باستخدام أيقونة Font-Awesome، بدون SQL
  2. الانتقال إلى admin/users، والبحث عن المستخدم المطلوب
  3. النقر على Edit badges
  4. اختيار الشارة التي تم إنشاؤها
  5. كتابة سبب (مهم!) https://www.cuba-platform.com/discuss/t/redirecting-http-to-https/3977/4
  6. النقر على Grant
  7. ستظهر لك رسالة خطأ، راجع التفاصيل أدناه في الصورة.

إذا كان حقل السبب فارغًا، فلا توجد أي أخطاء.

منتداي موجود في مجلد فرعي، وربما يكون هذا هو سبب الفشل:

إعجابَين (2)

This looks incredibly likely to be the reason, unable to repro on non-subfolder.

4 إعجابات

Hi,
I was able to find the issue. I found it out after seeing that we were returning 404 in the first screenshot instead of 400. We were not taking care of relative_root_url while parsing reason of badge.

I have created PR for the same here:

7 إعجابات

This has been merged. Thank you @saurabhp!

4 إعجابات

This topic was automatically closed after 3 days. New replies are no longer allowed.