Implemented Template change control / versioning

Ryan Kent

Well-known member
I was thinking about the issue caused by template code being lost whether due to updates, reversions, or otherwise. Can a process be implemented whereby templates are not over-written per se but instead the most recent template is used and the prior template is still available but inactive? This would be something like updating a wiki page where you can look back through past edits. The advantages I see from this process are:

- During updates any overwritten template can be retrieved
- If a user reverts a template then changes his mind, he can still retrieve the prior code
- If a user makes a template coding error, he can always go back and retrieve the old data

Currently users need to copy/paste template data and store the info. In a worst case scenario, we need to restore a backup of our forums to get at the old templates. I think the above suggestion would be a nice improvement.
 

Kier

XenForo developer
Staff member
Note that custom and customized templates are NEVER overwritten by the upgrade process.
 
R

ragtek

Guest
Your changed templates will not be overwritten while the upgrade!

Edit: oh kier was faster
 

Mike

XenForo developer
Staff member
I believe the situation here revolved around making modifications to the Flexile style itself, and then installing an update to it (which overwrites the existing style [as a "merge" approach isn't really feasible]).
 

Ryan Kent

Well-known member
I believe the situation here revolved around making modifications to the Flexile style itself, and then installing an update to it (which overwrites the existing style [as a "merge" approach isn't really feasible]).
EXACTLY.

During my flexile style update my Extra.css, cta_xxx templates for Brogan's RSS feed, and a couple custom templates I had created for social icons were all wiped. Ultimately I restored a forum backup to my test site to retrieve the data. It wasn't a fun process!

I've learned from the process, wont happen again, but still the idea of template versioning still seems relevant.
 

Brogan

XenForo moderator
Staff member
The new feature in 1.2 related to template history should cover this so I am marking it as implemented.
 
Top