SMx accidentally deleted the FAQ and TOS pages during a cleanup after a failed migration, causing broken links. gerhard advised verifying deletion via Rails console using Topic.with_deleted.exists? queries, which confirmed both topics were gone. gerhard then guided SMx to recreate the topics in the Staff category and assign their IDs via SiteSetting.guidelines_topic_id and SiteSetting.tos_topic_id, followed by manually updating content using the method described in this guide. SMx also asked if SiteSetting.privacy_topic_id controls the /privacy page, which gerhard confirmed. SMx later confirmed the fix worked successfully after verifying the topics were missing and reassigning them.
I may have deleted FAQ and TOS pages by mistake and I now have a spinning wheel when I click on the FAQ link on the hamburger menu, and “topic not found” for the TOS.
Should I just create these topics? Will they have the same link?
Is there a command to re-build these core files?
Thank you so much @gerhard. Very helpful as always.
As soon as I get at a computer I’ll check this out.
We had a failed migration and wanted to keep discourse settings while deleting the migrated topics/categories. And because we had a “trash” folder with about 70k topics of trash, all written by “system”, we had to forcefully clear from the DB all topics created.
Is this the command for the “/privacy” page?
SiteSetting.privacy_topic_id = 4712 # replace with topic id