Can you check your preferences page to see if the category has been muted for your user?
I was about to protest, because the reason I even discovered the problem was that users of the forum (I’m an admin) started complaining about the missing Classifieds section (Category). But you’re right, it is muted for my user. The thing is, I never muted it. Also, it must be muted for other users as well then, since they’re complaining.
How could that have happened?
Thanks!
Did you previously have the category set to be suppressed from the latest page? If so, the category was probably muted for all users on your site by a migration that occurred after that setting was removed. If this is the case, it can be fixed from the rails console.
Nothing in the logs, no. Having re-found the Category (see previous message), I tried posting an ad. It worked but there are no buttons.
I can still see the buttons mentioned (and they’re all checked) in the Category Settings, but they don’t show up on my listings.
Any idea how that could be fixed?
Thanks!
No, at least not as far as I know. Users are complaining though, so it seems as if it has been muted for everyone. How can I fix that from the rails console?
Thanks!
First take a backup of your site in case anything goes wrong. Then:
# Get the category and assign it to a variable
c = Category.find_by(name: "<your category name>")
# Unmute the category for all users
CategoryUser.where(category_id: c.id, notification_level: 0).destroy_all
Edit:
If you’d like to see how many users the category has been muted for, before running the second command, try running
CategoryUser.where(category_id: c.id, notification_level: 0).count
That will return a count of users who have the category muted.
the buttons are visible for topic author when he/she opens the topic… not in the topic list. Or what listing are you talikng about?
Never mind! After I unmuted the Category, the buttons are now showing. Or maybe it was the restart that cleared it. Either way, things are working again now. Sorry to have bothered you with this, thanks for your help!
Gunnar
I’m going to give that a try as soon as I get a chance. Thanks!
It’s @simon you should thank. He did the heavy lifting 
Simon,
=> 43653
Oops. 
I have to admit, that .destroy_all part of the above command looks scary. What does it do, just remove the mute flag?
Thanks again!
Any destructive actions run on the console are a little scary. Make sure you take a backup before running them.
A CategoryUser record describes a user’s notification level for a category. A notification_level of 0 means that the category is muted for the user. You can find more information here: (Obsolete) Set category tracking level defaults historically.
Deleting all CategoryUser records for a given category_id with a notification_level of 0, will remove that category from the muted list for all users on your site.
When I run a command like this, I usually add an extra step that I didn’t post above. Instead of running
CategoryUser.where(category_id: c.id, notification_level: 0).destroy_all
in a single step, I’ll assign the records to a variable so that I can double check that I’m dealing with the correct data. Something like this:
# Get the category and assign it to a variable
c = Category.find_by(name: "<your category name>")
# Assign the category_users to a variable and examine the data. Make sure the records have the
# correct category_id etc.
muted_category_users = CategoryUser.where(category_id: c.id, notification_level: 0)
# When you are certain that the data is correct run
muted_category_users.destroy_all
你好 @Janno_Liivak,非常感谢你提供的插件!
请添加俄语翻译。我已将纯文本内容放在下方。
server.ru.yml
ru:
site_settings:
topic_trade_buttons_enabled: "启用销售控制按钮?"
topic_trading:
sold: 已售出
purchased: 已购买
exchanged: 已交换
cancelled: 已下架
client.ru.yml
ru:
js:
topic_trading:
enable_sold_button: 启用“已售出”按钮
enable_purchased_button: 启用“已购买”按钮
enable_exchanged_button: 启用“已交换”按钮
enable_cancelled_button: 启用“已下架”按钮
sold: 已售出
purchased: 已购买
exchanged: 已交换
cancelled: 已下架
error_while_marked_as_sold: 标记为“已售出”时发生错误
error_while_marked_as_purchased: 标记为“已购买”时发生错误
error_while_marked_as_exchanged: 标记为“已交换”时发生错误
error_while_marked_as_cancelled: 标记为“已下架”时发生错误
mark_as_sold_confirm: 您要将此公告标记为“已售出”吗?
mark_as_purchased_confirm: 您要将此公告标记为“已购买”吗?
mark_as_exchanged_confirm: 您要将此公告标记为“已交换”吗?
mark_as_cancelled_confirm: 您要将此公告标记为“已下架”吗?
你好,感谢 @Dmitry_Krasnoperov!我已添加了俄语翻译。
对于其他插件用户来说……如果您允许的语言中不包含俄语,则无需更新插件,因为除此之外没有任何更改。
太棒了!!!现在投入生产。
你好,Janno
我已经为你的插件制作了德语翻译。你方便将它们添加到你的插件中吗?
你只需要将其重命名为 .yml 文件,因为 Discourse 不允许直接上传。client.de.txt|附件 (1.1 KB) server.de.txt|附件 (218 字节)
你好,@Lagger_Gandalf!非常感谢。我已添加了您提供的德语翻译 ![]()
我的论坛无法使用(难过)
启用插件后请尝试重启 Discourse。如果仍然无法工作,请提供更多关于您问题的信息。您可以给我发一条俄语消息……我大致能看懂 ![]()
你好 )) 我已全部启用) 并重启了 Discourse =/ 但没有任何变化!