Mayank_Garg is seeking help to recover a previous version of a theme after attempting to reconfigure it as a child theme in a development environment, resulting in lost changes. sam expresses sympathy and explains that while recovery is possible through logs/development.log, Discourse does not store theme history in the database. Sam strongly recommends using version control for all themes and components to prevent such issues. Moin suggests checking the staff action logs at yourForum/admin/logs/staff_action_logs, where actions related to theme changes are recorded. Moin notes that clicking the “show” button next to a logged action reveals the theme’s code at that point in time, potentially allowing recovery. Two screenshots are included to illustrate the process Moin describes. The thread highlights the importance of version control and leveraging built-in logs as a recovery method for theme modifications in Discourse.
Hii All,
I attempted to configure a local theme as a component, but it did not function as expected. I subsequently tried to reconfigure the local theme as a child theme to my original parent theme. This process took place in the development environment; however, I am now unable to retrieve the previous version of the theme or the changes I had implemented.
Can anyone please help me recover the previous state of this theme or provide guidance on how to restore the lost changes?
Oh so sorry to hear, there are complex ways to recover in the dev environment, you could go fishing through logs/development.log but I do not think we store history in our actual DB.
The best and safest approach it to lean on version control for all your themes and components, be sure to have each of them in version control.
Did you check the staff action logs at yourForum/admin/logs/staff_action_logs?
There should be logs related to the change theme action, and you can see the code of that theme when you check the details after clicking the “show” button on the right.