タグの「ピリオド」

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コンソール_は、管理者が簡単に見つけて使用できるものですか?

管理者が#last.fm (おっと!そのページは存在しないか、非公開です。)を、例えば#lastfmのような別のものに名前変更できるように、_railsコンソール_を見つける方法を説明していただけますか?

「いいね!」 1

サーバーからレールコンソールにアクセスします。検索すると、より詳細なトピックがいくつかありますが、基本的に次のようになります。

サーバーにSSHで接続します。

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

ただし、事故が発生する可能性があるため、変更を試みる前に必ずバックアップを取得してください。

Administrative Bulk Operations には、試す前に読んでおくべき例がいくつかあります。

「いいね!」 2