标签中的“句号”

Does having a “period” at the beginning of a tag cause an error when tag is clicked on?

On my technical community we have one tag that was probably created before punctuation started to be stripped from new tags. Now I am not able to click on the tag and see a list of all the topics with it. I would like to update this tag so our team no longer gets an error. Right now though I can’t figure out how to see all the topics. When I use the advanced search it only picks up around 50 topics. The tag has over 1100 topics associated so I know that isn’t right.

2 个赞

Based on my testing, periods are not allowed in tags. So perhaps you have an older version of Discourse where that was previously allowed?

Yes, we did have a older version and just updated for the first time in over a year a few weeks. I’m assuming that is why this one tag is now an issue. Is there a way to get at the tag even with the error coming up? That way I can bulk change all effected topics.

I’m not sure; @eviltrout can you recommend someone who worked on tagging recently?

You’ll probably need to use the rails console to fix this:

t = Tag.find_by_name(".oldnamewithperiod")
t.name = "newnamewithoutperiod"
t.save
2 个赞

rails 控制台 是管理员可以轻松找到和使用的东西吗?

您能描述一下如何找到 rails 控制台 吗? 这样我的管理员就可以重命名 #last.fm (哎呀!该页面不存在或已设为私有。) 为其他名称,例如 #lastfm

1 个赞

您可以通过服务器访问 rails 控制台。如果您有搜索功能,有很多主题会更详细地介绍,但本质上是:

SSH 进入您的服务器

cd /var/discourse
./launcher enter app
rails c

不过,我应该提醒您,在尝试任何更改之前,请务必进行备份,因为意外可能会发生。

Administrative Bulk Operations 中有许多示例,如果您想在尝试任何操作之前先阅读一下。

2 个赞