カスタムバッジの付与に失敗しました:理由フィールドが空でないため

こんにちは、最新の安定版 1.9.3+2test-passed の両方を確認したところ、理由フィールドが空でない場合、カスタムバッジをユーザーに付与できないことに気づきました。

再現手順:

  1. SQL を使用せず、Font Awesome アイコンを使った新しいシンプルなバッジを作成します
  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.