# Как исправить страницы FAQ, политики конфиденциальности и условий использования?

**URL:** https://meta.discourse.org/t/how-to-fix-faq-privacy-policy-and-tos-page/179013
**Category:** Support
**Created:** [09.Февраль.2021 06:35:14 UTC](https://meta.discourse.org/t/how-to-fix-faq-privacy-policy-and-tos-page/179013 "2021-02-09T06:35:14Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rieko](https://avatars.discourse-cdn.com/v4/letter/r/e480ec/32.png) [@rieko](https://meta.discourse.org/u/rieko)
#### Post date: [09.Февраль.2021 06:35:14 UTC](https://meta.discourse.org/t/how-to-fix-faq-privacy-policy-and-tos-page/179013/1 "2021-02-09T06:35:14Z")

</div>

Я по ошибке удалил страницы FAQ, политики конфиденциальности и условий использования в консоли (rails c).  
Теперь я хочу восстановить эти страницы.  
Как это исправить?  
Я не вижу эти страницы, потому что индикатор загрузки крутится бесконечно…  
Пожалуйста, помогите.

---

<div class="post-metadata">

### Author: ![Thomas\_G](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thomas_g/32/200158_2.png) [@Thomas\_G](https://meta.discourse.org/u/Thomas_G)
#### Post date: [09.Февраль.2021 06:46:24 UTC](https://meta.discourse.org/t/how-to-fix-faq-privacy-policy-and-tos-page/179013/2 "2021-02-09T06:46:24Z")

</div>

Привет!

Жаль, что так вышло. Надеюсь, следующее сообщение поможет:

> [@How to regenerate FAQ and TOS pages?](https://meta.discourse.org/t/how-to-regenerate-faq-and-tos-pages/110625/2?u=thomas_g):
>
> Interesting. How did you manage to delete those topics? You shouldn’t be allowed to delete them in the UI. First, let’s see if the topics are really gone. ./launcher enter app rails c Topic.with\_deleted.exists?(SiteSetting.guidelines\_topic\_id) Topic.with\_deleted.exists?(SiteSetting.tos\_topic\_id) If the topics are really gone, create two new topics in the Staff category and assign the topic ids in the rails console to the site settings. SiteSetting.guidelines\_topic\_id = 4711 # replace with t…

---

<div class="post-metadata">

### Author: ![rieko](https://avatars.discourse-cdn.com/v4/letter/r/e480ec/32.png) [@rieko](https://meta.discourse.org/u/rieko)
#### Post date: [10.Февраль.2021 01:43:16 UTC](https://meta.discourse.org/t/how-to-fix-faq-privacy-policy-and-tos-page/179013/3 "2021-02-10T01:43:16Z")

</div>

@Thomas_G Привет! Спасибо за помощь.  
Я проверил существование страниц.

```ruby
Topic.with_deleted.exists?(SiteSetting.guidelines_topic_id)
Topic.with_deleted.exists?(SiteSetting.tos_topic_id)
Topic.with_deleted.exists?(SiteSetting.privacy_topic_id)

```

Результаты везде true, поэтому я попытался восстановить их.

```ruby
faq = Topic.with_deleted.find(SiteSetting.guidelines_topic_id)
tos = Topic.with_deleted.find(SiteSetting.tos_topic_id)
pp = Topic.with_deleted.find(SiteSetting.privacy_topic_id)

faq.recover!
tos.recover!
pp.recover!

```

Восстановление прошло успешно в терминале, но на страницах /faq, /toc и /privacy появилась ошибка.  
Затем я проверил topic\_id этих тем в терминале и указал URL-адреса в разделе /admin/site\_settings/category/legal.

Теперь страницы работают корректно. Спасибо!
