How to ungenerate tos/privacy topics?

AI-generated summary

The discussion addresses how to completely remove TOS and privacy policy topics from a Discourse site. TempAccount initially tried deleting the topics permanently via the Rails console but encountered issues, including an error when using the ‘replace text’ feature. JammyDodger explains that editing these topics makes them persistent and suggests using the ‘replace text’ option on the /admin/customize/site_texts page, followed by resetting the company name setting. They also note that manually deleting topics can cause issues and recommend checking hidden site settings like privacy_topic_id and tos_topic_id. TempAccount confirms that following these steps resolved the issue, and JammyDodger offers encouragement, referencing a guide on regenerating FAQ and TOS pages.

Permanently deleting is possible, but it still shows the tab on the /about page. How would one get rid of it completely?

I think if you remove the company name you’ve set in the admin settings then those tabs magically disappear again. :magic_wand: :slight_smile:

(Unless you’ve set overrides in tos url and/or privacy policy url, otherwise you’d need to remove those as well)

I’d cleared all those fields and it still stays. Does it matter if you edited the post?

Ah yes, it does appear that making an edit to them makes them more sticky.

To get round this, I used the ‘replace text’ option on the /admin/customize/site_texts page to replace the edited ones. Then I added a value to company name, saved, and then reset that setting - and that seemed to make them disappear again. Hopefully you’ll have similar success. :crossed_fingers: :slight_smile:

Hmmm. I think i broke something when permanently deleting the topic via rails console.

The replace text throws an error for me.

I think you may have done. :slight_smile: Side-stepping the UI and deleting the (supposedly) undeletable topics can have some unforeseen consequences. :slight_smile:

Though it’s an easy fix. :partying_face: :slight_smile: (using the rails console)

There are a couple of hidden site settings where you’ll need to replace the topic_id for a ‘new’ topic you can have in its place.

There’s a bit more detail in this post - How to regenerate FAQ and TOS pages? - #2 by gerhard

And here’s the hidden settings guide - Hidden Site Settings Reference Guide

The two you want are privacy_topic_id and tos_topic_id

yep this one did the trick!

I am slowly crawling back up after digging that hole and diving head-first into it :blush:

…and the replace worked! Thanks @JammyDodger!

You’re certainly not the first. :slight_smile: I’m glad that’s done the job. :tada: :balloon: