the GNOME installation of Discourse has started exhibiting a weird behaviour every time we update it. This started around 2.3.
After every update we’re getting new topics like these:
About the Lounge category and
About the Site Feedback category are existing topics; the are followed by what looks like a hash.
Has anybody experienced an issue like this?
It looks like there’s a problem with a couple of site settings. You might want to check and correct the values of the following hidden settings in the rails console:
./launcher enter app
You should be able to update the settings by doing something like the following in the rails console:
SiteSetting.lounge_category_id = Category.find_by(name: "Lounge").id
SiteSetting.meta_category_id = Category.find_by(name: "Site Feedback").id
SiteSetting.staff_category_id = Category.find_by(name: "Staff").id
SiteSetting.uncategorized_category_id = Category.find_by(name: "Uncategorized").id
Delete the weird looking categories afterwards and restart Discourse (
./launcher restart app). The categories shouldn’t get recreated anymore.
Thanks for the help, but sadly it did not work; even after setting the category id in the site settings, we’re still seeing the duplicate categories when restarting Discourse.
One thing I neglected to mention is that our Discourse instance is running inside OpenShift.
Well, then I’m not sure what’s going on here. Maybe there’s a problem how migrations are running in OpenShift?
db/fixtures/500_categories.rb is responsible for seeding categories and there are checks to prevent the creation of duplicate categories unless the site setting values are negative or the creation of the category is forced (the “Uncategorized” category must exist).