XF 1.1 Weirdness reverting outdated templates on 1.1

I was using 1.04. Just updated to 1.1. I have about a dozen templates with minor changes as listed by "Outdated templates."

My normal procedure done on all updates until now is:

1. On the "prior" version, run a script that downloads (with WebDAV) all templates from style 0 ("master") and my style, #2. This gives me a baseline for all my diffs.

2. Run the update, then get a list of "Outdated Templates" from the admin cp.

3. For each of the Outdated templates, hit Revert to undo my changes and use the latest version from the new release

4. Go in and apply my diffs from #1 (by hand so nothing weird happens) to all the templates listed as Outdated from #2. I usually do this by downloading the style 2 template via WebDAV, then editing it in emacs, and then uploading it via WebDAV again (to Style 2)

This has worked for every update until now.

Going to 1.1, the difference is when I hit "revert" on the Outdated Templates, it removes the template from the Outdated list, but it does NOT seem to actually roll back to the latest, unmodified, version from the new release. (Since there is no modified version of the template in style 2, it should take the base/master version.) To clarify, if I hit Revert and then EITHER go to the template for style 2 and view/edit it, there is no Revert option and the old data is there; or when I download from style 2 via WebDAV I get the old data (non reverted)

To work around this, I had down download the style 0 version from WebDAV, apply my diffs, and then upload into style 2.

Could someone on the XenForo team comment on this?



XenForo developer
Staff member
This isn't something anyone else has reported, and I don't see how the code could really produce that. Can you reproduce it by editing a template and simply reverting it?
If I take an up to date template and add a comment and repeat the process, I cannot get it to happen.

However, this is not quite the same flow because I'm not hitting the Revert button from the Outdated Template list. IE, there is no way I can put stuff back into the Outdated List.

I did have one outdated item left in an obsolete style. So I just did the following:

1. noted what change I had made in the past
2. go to the Outdated Template list, select it, hit Revert
3. If I select that template in that style and view it in the admin cp, it has NOT reverted. If I view it through webdav (style 3 in this case), it is not reverted.

Furthermore, the "Edit Template: message_user_info" screen does NOT have a "Revert" button at the bottom even though it is a modified version of the template.

ETA- the "bug" in the flow does not seem to apply to new edits, just old, outdated templates


XenForo developer
Staff member
The revert button on the outdated templates page and the revert button on the main template list do the same thing -- they call the same code. I'm really unsure how this could happen.
I have one template (from an obsolete style) left in the state where it has been "reverted" but the modified one is still showing up. If you want to poke around the database to see what's up I can provide a login to the machine.

I think all my production templates are fixed, but I am kind of worried that there is something "off" in the tracking of the template inheritance system
Here's an illustration. In the first capture, we have the one that exhibits part of the issue. In style 3 ("TESTING"), message_user_info was changed a long time ago. It was listed in the Obsoleted Templates list. I did hit Revert from there. But obviously this is still my modified version. Also note that there is no Revert button underneath the text box. So the template inheritance/modification system does not think that it is modified, although it is highlighted as red in the tab above the text box.

In the second example, we have the production version in style 2 ("TBAC1"). I hit Revert from the Obsoleted Templates list, and noticed that when I went back into the template it was still my modified version. So I pulled the version from style 0 ("master"), made my changes, and saved that into style 2 ("TBAC1"). It is the updated 1.1 version with my diffs applied, and there is a "Revert" button under the text both.

Something is clearly confused in the first example.


XenForo developer
Staff member
The red dot in the first example just shows that it thinks that the template has changed from the loaded value, not that there's anything in the DB that's customized. The red background/border in the second shows that it thinks the template is customized.

I'll login and see what I can find if you submit a ticket with admin CP access and a way to poke around the database. Please mention where I should be looking for the issue. :)
Details in the ticket - thanks. You can log in via ssh and check out a text dump of the database from last night (mysqldump), run mysql, or log into the admin cp.
Just found the same issue with the 1.1.1 upgrade. I updated the support ticket with details. I reverted the template but its content is definitely not reverted to the default (style 0) version. I've left it without applying my normal diffs so you can take a look. thanks.