您好,我检查了最新的稳定版 1.9.3+2 和 test-passed,发现如果“原因”字段不为空,则无法授予用户自定义徽章。
复现步骤:
使用 font-awesome 图标创建一个简单的徽章,不使用 SQL
进入 admin/users,找到目标用户
点击“编辑徽章”
选择刚创建的徽章
输入原因(重要!)https://www.cuba-platform.com/discuss/t/redirecting-http-to-https/3977/4
点击“授予”
您将收到一个错误,详情见下图。
如果“原因”字段为空,则不会出现错误。
我的论坛位于子文件夹中,这可能是导致失败的原因:
2 个赞
sam
(Sam Saffron)
2018 年3 月 7 日 01:50
2
This looks incredibly likely to be the reason, unable to repro on non-subfolder.
4 个赞
saurabhp
(Saurabh Patel)
2018 年12 月 31 日 08:10
3
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:
master ← mrfinch:saurabh/reason-folder-fix
closed 07:00AM - 11 Jan 19 UTC
it takes care if there is a relative url root
https://meta.discourse.org/t/un… able-to-grant-custom-badge-for-non-empty-reason-field/82299
7 个赞
tgxworld
(Alan Tan)
2019 年1 月 11 日 07:00
4
This has been merged. Thank you @saurabhp !
4 个赞
tgxworld
(Alan Tan)
关闭
2019 年1 月 14 日 10:00
5
This topic was automatically closed after 3 days. New replies are no longer allowed.