I deleted faq, privacy policy and tos page by mistake on console (rails c).
Now I would like to make those pages again.
How can I fix?
I cannot see those pages because loading circle spinning forever…
Please help me.
Hello!
That’s unfortunate and hope the following post will help:
4 Likes
@Thomas_G Hallo! Thanks for your help.
I checked the existence of the pages.
Topic.with_deleted.exists?(SiteSetting.guidelines_topic_id)
Topic.with_deleted.exists?(SiteSetting.tos_topic_id)
Topic.with_deleted.exists?(SiteSetting.privacy_topic_id)
The results are all true so I tried to recover.
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!
The recover succeeded on terminal but /faq
, /toc
and /privacy
showed error.
Then I checked topic_id of those topics from terminal and set urls to /admin/site_settings/category/legal
.
Now the pages are fine. Thank you!
4 Likes