XF 1.5 Sorting out outdated templates...

Gladius

Well-known member
Are there any guides for sorting out outdated templates post-upgrading? I couldn't find anything in help and the inbuilt XF functions are completely unintuitive and without any help or legends.

As it is, I have no clue what I'm looking at via "View Template Modifications" (whose? mine? the upgrade's?) vs. "View Custom Changes" (which I assume shows mine, but again I'm not sure what the red and green blocks in that view signify -- are these only the old changes, or in light of the upgraded template or what...).
 
Last edited:
If the automatic merging function partially fails, then you need to manually merge the changes. Areas highlighted blue mean there was no conflict and the automatic merger worked, while areas highlighted yellow mean there was a conflict and you have three options:
  1. Use XenForo's code
  2. Use your code
  3. Use a combination of both

For example, on our KH-Flare 2014 style, trophies were commented out everywhere, so I had to fix that in the merger by using XenForo's code for the new if conditional added because of the new enable/disable option for trophies and re-adding my comment out code.

If you can't even access the manual merging page, you'll need to revert the template and re-apply your changes.
 
I haven't actually tried using the automatic merger yet because I'd first like to manually compare the old vs. the new template but I'm not even sure how to achieve that, if even possible. We've got some changes around the avatar bit in message_user_info but I don't remember exactly what any more so I'd like to check first before doing anything automatic. I haven't managed to figure out XF's system yet on how to do that, unfortunately.
 
To manually compare you will need to take a copy of the edited template and save it.

Revert the template, take a copy of the default code and save it, or use the code from a default, unedited style.

Use a program such as Notepad++ to do a comparison between the two.
 
o_O I'd write that you've gotta be kidding me, but I know that you aren't... where's a jawdrop smiley when you need one.

What am I missing here? I read years back that XF's system was supposed to be miles better than vB's, but when I can't even compare templates side by side inside the software, this is like going back to the stone age. :confused:
 
Can someone explain to me exactly what I'm looking at on the template edit page, specifically in:
  • "View Template Modifications" (whose? mine? the upgrade's? which version?)
and
  • "View Custom Changes" (which I assume shows mine, but again I'm not sure what the red and green blocks in that view signify -- are these only the old changes, or in light of the upgraded template or what...).
I should be able to work with that if I can only figure out what's what.
 
o_O I'd write that you've gotta be kidding me, but I know that you aren't... where's a jawdrop smiley when you need one.

What am I missing here? I read years back that XF's system was supposed to be miles better than vB's, but when I can't even compare templates side by side inside the software, this is like going back to the stone age. :confused:
You said you wanted to compare manually.

The built in compare and auto merge functionality has already been explained to you by Amaury.

XF 1.2 - Template Merging and History
 
"View Template Modifications" (whose? mine? the upgrade's? which version?)
That's referring to the template modification system used by add-ons.

"View Custom Changes" (which I assume shows mine, but again I'm not sure what the red and green blocks in that view signify -- are these only the old changes, or in light of the upgraded template or what...).
This compares your version of the template against the default version (as it stands now). Red would be the value in the default and green the value in yours. Red is a delete, green is an add. When you change something, you are effectively deleting the old version and replacing it with the new version.
 
That's referring to the template modification system used by add-ons.

Can you expand on that a bit? If I look at the outdated template in question using the "View Template Modifications", I see only a single line added (green). Does that mean that that is the only change in the template since the previous version, that is, the only change that effectively needs to be applied to bring the template up to date and retaining previous modifications?

This compares your version of the template against the default version (as it stands now). Red would be the value in the default and green the value in yours. Red is a delete, green is an add. When you change something, you are effectively deleting the old version and replacing it with the new version.

Ah, that's a bit clearer now. However, with this system, I don't think that I can tell what's been added vs. what's only been changed, can I? Not without commenting every change previously, anyway... because if I understand you correctly, the old code and any altered or new will just show in a red/green block together and there's no way to distinguish between an addition vs. a change?
 
Can you expand on that a bit? If I look at the outdated template in question using the "View Template Modifications", I see only a single line added (green).
It's referring to the template modifications system, so it's showing what changes are being programmatically added to the template via template modifications (likely from add-ons). This is not related to what you're asking about here.

However, with this system, I don't think that I can tell what's been added vs. what's only been changed, can I?
It's a comparison between what is the current the default and your current (customized) version, so if there are parent changes you haven't incorporated, then they will show as differences. This isn't really designed for comparing an outdated template.

because if I understand you correctly, the old code and any altered or new will just show in a red/green block together and there's no way to distinguish between an addition vs. a change?
I'm not really sure what you're specifically calling an "addition" vs a "change". If you've added a line, it would show up as a green line only. However, if there are lines that have differences, they will show up as the old version being removed (red) and the new version being added (green). If you're comparing using an outdated version of a template, this would lead to your custom version showing green values for older lines (because they appear to be a change that you've made).

The system to deal with outdated templates is likely the best way to track things, though it doesn't explicitly expose what's from the old default to the new default and the old default to your custom version. This system uses a three-way merge to determine areas that have only changed in one of the two comparisons and incorporates those changes automatically, which should lead to more accurate merges and (ideally) fewer conflicts to resolve (which only happens when both versions have changed the same line compared to the old default).
 
The system to deal with outdated templates is likely the best way to track things, though it doesn't explicitly expose what's from the old default to the new default and the old default to your custom version.

Yea, this is the problematic bit for me. I'm not a coder, so in vB I had a bit more in terms of crutches that I could rely on than in XF.

This system uses a three-way merge to determine areas that have only changed in one of the two comparisons and incorporates those changes automatically, which should lead to more accurate merges and (ideally) fewer conflicts to resolve (which only happens when both versions have changed the same line compared to the old default).

Thanks Mike, makes more sense to me now and I expect I'll get the hang of it with some more practice. :D
 
I upgraded xf 1.5.12 now getting template outdated errors. The auto merge did nothing.

Using ui.x. do i need to upgrade this too? I just bought it. The upgrade is $99...ouch.

Original developer not around, not sure of what mods he did. What do you recommend? Thank u. I am not a techie (yet). Kid gloves please.

SmartSelectImage_2017-02-08-19-51-13.webp
 
Last edited:
You will likely need to upgrade to the latest version of the style.

You should post in the resource thread as that's where to obtain support for third party styles.
 
Back
Top Bottom