# Pre seeded posts all missing - Missing Terms of Service, FAQ and Privacy pages

**URL:** https://meta.discourse.org/t/pre-seeded-posts-all-missing-missing-terms-of-service-faq-and-privacy-pages/149314
**Category:** Support
**Created:** [26 april 2020 om 04:02 UTC](https://meta.discourse.org/t/pre-seeded-posts-all-missing-missing-terms-of-service-faq-and-privacy-pages/149314 "2020-04-26T04:02:35Z")
**Posts on this page:** 17
**Page:** 2

<div class="post-metadata">

### Author: ![Paul\_King](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paul_king/32/165426_2.png) [@Paul\_King](https://meta.discourse.org/u/Paul_King)
#### Post date: [8 mei 2020 om 13:17 UTC](https://meta.discourse.org/t/pre-seeded-posts-all-missing-missing-terms-of-service-faq-and-privacy-pages/149314/21 "2020-05-08T13:17:38Z")

</div>

> [@nathank](#):
>
> In the ‘topics’ table, deleted\_at will have a timestamp for ID 4, 5, and 6. If you can delete these (replace with nothing / blank) then you will be back in business.

Hi again - in my lame way, I tried the following query in [Data Explorer](https://meta.discourse.org/t/32566?silent=true), and got no relevant hits for messages deleted in the Staff category

```
SELECT *
FROM topics
WHERE deleted_at is not NULL
AND category_id = 3 

```

or even in any category

```
SELECT *
FROM topics
WHERE deleted_at is not NULL

```

So wondering if there is something else going on if the topics were not deleted?. Is there some other way to detect those missing topics? Or are system posts perhaps not stored in the topics table at all?

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [8 mei 2020 om 18:42 UTC](https://meta.discourse.org/t/pre-seeded-posts-all-missing-missing-terms-of-service-faq-and-privacy-pages/149314/22 "2020-05-08T18:42:57Z")

</div>

Good to see your [Data Explorer](https://meta.discourse.org/t/32566?silent=true) skills!  
Those topics are definitely in the topics table.

Try this:

```plaintext
SELECT id, title, deleted_at
FROM topics
Order by id
Limit 10

```

You should get something like this:

 ![Screenshot 2020-05-09 at 06.39.37](https://global.discourse-cdn.com/meta/original/3X/0/4/04b14c8505474606a7824d21f982c9d70fa5990c.png)

PS you might also need to change `deleted_by_id`

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [8 mei 2020 om 20:54 UTC](https://meta.discourse.org/t/pre-seeded-posts-all-missing-missing-terms-of-service-faq-and-privacy-pages/149314/23 "2020-05-08T20:54:13Z")

</div>

Hey @Paul_King, have you tried this?

> [@How can I delete or undelete topics?](https://meta.discourse.org/t/how-can-i-delete-or-undelete-topics/41700/29):
>
> Search example.com/latest?status=deleted, find the deleted topic and click the Un-delete button [image]

---

<div class="post-metadata">

### Author: ![Paul\_King](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paul_king/32/165426_2.png) [@Paul\_King](https://meta.discourse.org/u/Paul_King)
#### Post date: [8 mei 2020 om 23:44 UTC](https://meta.discourse.org/t/pre-seeded-posts-all-missing-missing-terms-of-service-faq-and-privacy-pages/149314/24 "2020-05-08T23:44:26Z")

</div>

> [@nathank](#):
>
> Try this:
> 
> ```plaintext
> SELECT id, title, deleted_at
> FROM topics
> Order by id
> Limit 10
> 
> ```

Thanks Nathan - a great suggestion  
However the lowest topic ID found amongst deleted topics is 20

 ![2020-05-09_11h43_22](https://global.discourse-cdn.com/meta/original/3X/f/4/f46c5383ca82d2934e7aff4302e97c8bb90eae47.jpeg)

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [8 mei 2020 om 23:52 UTC](https://meta.discourse.org/t/pre-seeded-posts-all-missing-missing-terms-of-service-faq-and-privacy-pages/149314/25 "2020-05-08T23:52:04Z")

</div>

Do you have any of 1-10? It appears not.

It could be that rebuilding the site from scratch and then merging the databases in some way is the way forwards. Or get hacking that postgres!

---

<div class="post-metadata">

### Author: ![Paul\_King](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paul_king/32/165426_2.png) [@Paul\_King](https://meta.discourse.org/u/Paul_King)
#### Post date: [8 mei 2020 om 23:52 UTC](https://meta.discourse.org/t/pre-seeded-posts-all-missing-missing-terms-of-service-faq-and-privacy-pages/149314/26 "2020-05-08T23:52:12Z")

</div>

> [@How can I delete or undelete topics?](https://meta.discourse.org/t/how-can-i-delete-or-undelete-topics/41700/29):
>
> Search [example.com/latest?status=deleted](http://example.com/latest?status=deleted), find the deleted topic and click the Un-delete button [image]

Hi Nathan - that definitely lists a bunch of deleted topics, but none of the pre-seeded ones missing from the staff category

---

<div class="post-metadata">

### Author: ![Paul\_King](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paul_king/32/165426_2.png) [@Paul\_King](https://meta.discourse.org/u/Paul_King)
#### Post date: [9 mei 2020 om 00:11 UTC](https://meta.discourse.org/t/pre-seeded-posts-all-missing-missing-terms-of-service-faq-and-privacy-pages/149314/27 "2020-05-09T00:11:09Z")

</div>

> [@nathank](#):
>
> It could be that rebuilding the site from scratch and then merging the databases in some way is the way forwards. Or get hacking that postgres!

I am wondering if I even can hack the database to cancel deletions if there is no sign of the missing pre-seeded posts ever having existed? Is there a way to rerun the setup wizard on an existing installation, to trigger those pre-seeeded posts to be created? Is there some way the setup wizard could have omitted them the first time? (perhaps there was an option where I clicked ‘skip’ the first time round?)

Is it possible that there was a bug in play with the then current discourse version at the time I set up?

Is it possible that if the missing pre-seeded posts are not even marked as deleted, but simply don’t exist, the absences will not propagate or overwrite anything if I restore backed up database to a fresh Discourse install? Or is it the case that the starting database is removed entirely and replaced by the backup, with all its flaws?

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [11 mei 2020 om 01:52 UTC](https://meta.discourse.org/t/pre-seeded-posts-all-missing-missing-terms-of-service-faq-and-privacy-pages/149314/28 "2020-05-11T01:52:51Z")

</div>

Another thing to try is selecting `tos_topic_id`, `guidelines_topic_id`, and `privacy_topic_id` from the `site_settings` table.

Sorry, with this SQL:

```plaintext
SELECT value
FROM site_settings
WHERE name = 'tos_topic_id'

```

---

<div class="post-metadata">

### Author: ![Paul\_King](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paul_king/32/165426_2.png) [@Paul\_King](https://meta.discourse.org/u/Paul_King)
#### Post date: [11 mei 2020 om 02:29 UTC](https://meta.discourse.org/t/pre-seeded-posts-all-missing-missing-terms-of-service-faq-and-privacy-pages/149314/29 "2020-05-11T02:29:49Z")

</div>

> [@riking](#):
>
> Another thing to try is selecting `tos_topic_id` , `guidelines_topic_id` , and `privacy_topic_id` from the `site_settings` table.

Thanks Kane

I may well be doing this wrong but for me  
`SELECT tos_topic_id, site_settings`

or (not sure which is correct, if any)

```
SELECT tos_topic_id
FROM
site_settings

```

returns  
PG::UndefinedColumn: ERROR: column “tos\_topic\_id” does not exist  
LINE 7: SELECT tos\_topic\_id, site\_settings

Which I take to mean there is no ‘tos\_topic\_id’?

Similar result for `guidelines_topic_id` , and `privacy_topic_id`

---

<div class="post-metadata">

### Author: ![wyudong](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wyudong/32/180747_2.png) [@wyudong](https://meta.discourse.org/u/wyudong)
#### Post date: [22 mei 2020 om 13:23 UTC](https://meta.discourse.org/t/pre-seeded-posts-all-missing-missing-terms-of-service-faq-and-privacy-pages/149314/30 "2020-05-22T13:23:34Z")

</div>

This may helps: [How to regenerate FAQ and TOS pages?](https://meta.discourse.org/t/how-to-regenerate-faq-and-tos-pages/110625)

---

<div class="post-metadata">

### Author: ![Paul\_King](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paul_king/32/165426_2.png) [@Paul\_King](https://meta.discourse.org/u/Paul_King)
#### Post date: [22 mei 2020 om 23:08 UTC](https://meta.discourse.org/t/pre-seeded-posts-all-missing-missing-terms-of-service-faq-and-privacy-pages/149314/31 "2020-05-22T23:08:14Z")

</div>

Thank you!! That is exactly what I was looking for - though sadly for me the final  
`rake topics:update_static[en]`  
command gives an error - not sure why, or how to deal with it.

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [23 mei 2020 om 00:51 UTC](https://meta.discourse.org/t/pre-seeded-posts-all-missing-missing-terms-of-service-faq-and-privacy-pages/149314/32 "2020-05-23T00:51:03Z")

</div>

What’s the error? (It’s always a good idea to post the error if you want help. 😉)

---

<div class="post-metadata">

### Author: ![wyudong](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wyudong/32/180747_2.png) [@wyudong](https://meta.discourse.org/u/wyudong)
#### Post date: [23 mei 2020 om 05:10 UTC](https://meta.discourse.org/t/pre-seeded-posts-all-missing-missing-terms-of-service-faq-and-privacy-pages/149314/33 "2020-05-23T05:10:44Z")

</div>

@Paul_King I encountered an error too when run `update_static`, but my FAQ page is back!  
@gerhard The error is the followings and I guess it’s same for Paul.

```plaintext
[5] pry(main)> rake topics:update_static[zh_CN]
NameError: undefined local variable or method `update_static' for main:Object

```

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [23 mei 2020 om 11:11 UTC](https://meta.discourse.org/t/pre-seeded-posts-all-missing-missing-terms-of-service-faq-and-privacy-pages/149314/34 "2020-05-23T11:11:31Z")

</div>

You were running the rake task in the rails console which doesn’t work. But when you run it correctly, you will notice that the rake task doesn’t exist anymore. 😉

Instead I recommend using the “Manual Update” method described in [Update seeded categories and topics](https://meta.discourse.org/t/update-seeded-categories-and-topics/111963). I edited the steps in [How to regenerate FAQ and TOS pages? - #2 by gerhard](https://meta.discourse.org/t/how-to-regenerate-faq-and-tos-pages/110625/2) accordingly.

---

<div class="post-metadata">

### Author: ![Paul\_King](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paul_king/32/165426_2.png) [@Paul\_King](https://meta.discourse.org/u/Paul_King)
#### Post date: [23 mei 2020 om 13:40 UTC](https://meta.discourse.org/t/pre-seeded-posts-all-missing-missing-terms-of-service-faq-and-privacy-pages/149314/35 "2020-05-23T13:40:22Z")

</div>

Is there a way to get the TOS and Privacy links in the signup dialog to work? Nothing above seems to have achieved that for me, though I can recreate TOS and Privacy topics that are not linked.

I am unsure exactly how these topics came to be missing in the first place. I just assumed I must have deleted them accidentally somehow when I discovered they were missing, but from my reading it seems this is not even supposed to be possible within the user interface - and given others seem to have struck a similar issue, could this involve a possible bug somewhere?

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [26 juni 2020 om 10:20 UTC](https://meta.discourse.org/t/pre-seeded-posts-all-missing-missing-terms-of-service-faq-and-privacy-pages/149314/36 "2020-06-26T10:20:03Z")

</div>

I’m not sure how you got on in the end, Paul, but you could now construct your own TOS and Privacy pages using this:

[https://meta.discourse.org/t/page-publishing/151971/31](https://meta.discourse.org/t/page-publishing/151971/31)

---

<div class="post-metadata">

### Author: ![Paul\_King](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paul_king/32/165426_2.png) [@Paul\_King](https://meta.discourse.org/u/Paul_King)
#### Post date: [26 juni 2020 om 11:09 UTC](https://meta.discourse.org/t/pre-seeded-posts-all-missing-missing-terms-of-service-faq-and-privacy-pages/149314/37 "2020-06-26T11:09:16Z")

</div>

Awesome! Thanks for the heads up Nathan.

Confirming this did the trick!

You have to also copy/paste the urls generated for published posts into the corresponding feilds in Settings/Legal as if these were ‘externally hosted’ Terms of Service & Privacy Policy pages, if you want the links to these in the new signup dialog to work. (not sure why FAQ is omitted from sign up dialog, but you can also set this url here as well - though not sure purpose of this feild/what otherwise links to it if not included in signup dialog?

A workaround that might unravel if the site ever moved to another url, but great in the meantime to at least allow people the option to see what the terms of service etc actually are before they sign up!

[Previous page](https://meta.discourse.org/t/pre-seeded-posts-all-missing-missing-terms-of-service-faq-and-privacy-pages/149314.md?page=1)
