Template modification errors and outdated templates
Add-ons change XenForo pages through template modifications. When a style has edited the same template, a modification can fail. How to spot and fix it.
Updated 4 min read By the D.C Style team
On this page
Add-ons rarely replace XenForo's templates. Instead, they use template modifications: small instructions such as "find this line in this template and add our button after it". That keeps add-ons compatible with XenForo updates. But if your style has changed the same line, the modification cannot find it, and the add-on's button, label or icon simply does not appear in that style. This guide shows how to spot a failed modification and fix it, and how to deal with outdated templates after an update.
Find failed template modifications
- In the Admin CP, open Appearance > Template modifications.
- Choose the tab for the kind of template. Most add-on changes are on the public tab.
- Modifications are grouped by add-on. Find the add-on in question.
- Each row ends with three numbers: applied / not found / error. A healthy modification has a number in the first position and zeros after it.
- Click the numbers to open the Template modification log. It shows every style and template the modification was tried on, and the status for each.
Two statuses matter:
- This template modification does not match any templates. The text it looks for is not in that style's version of the template, usually because the style changed it.
- Compiler error (may be from another template modification): the modification applied, but the result does not compile. Another add-on changing the same spot is a common cause.
Tip: If a feature works in XenForo's default style but not in yours, a "not found" result for your style is almost certainly the reason.
Fix a modification that does not match
Pick the option that suits your situation, starting from the top:
- Update your style. If you use a style from a designer, check for a version made for your XenForo version. Style updates often bring templates back in line with XenForo's, and the modification then matches again.
- Merge outdated templates. See the next section. An outdated customized template is a very common cause.
- Revert the customized template. In Appearance > Templates, pick your style, find the template the log names, and use Revert. The template goes back to the parent style's version, so you lose that template's customizations. Use View custom changes first so you know what you are removing.
- Ask for help. If you need both your style's change and the add-on's feature, open a ticket. We can tell you where the add-on's change should go in your version of the template.
Warning: Do not edit a D.C Style add-on's own templates or modifications to make them fit. Your change is overwritten the next time you upgrade the add-on. Customize templates safely explains the approach that survives upgrades.
Outdated templates after an update
When you customize a template in your style, XenForo keeps your copy. If an update then changes the original, your copy is outdated: it cannot include the newer changes, so new features and fixes may not work as expected. The Admin CP shows a notice: There are templates that may be outdated. Click here to review them.
- Open Appearance > Outdated templates.
- Click Automatically merge. XenForo merges every template where your changes and the update do not overlap.
- Any templates left over need manual merging. Open each one, click Merge, and choose which version of each changed part to keep.
If you use a third-party style, installing its latest version is often the easier way to update its templates.
After an add-on upgrade
An add-on upgrade can change its template modifications too. After upgrading, check the add-on's rows in Appearance > Template modifications once more. Checking takes a minute, and it catches problems before your members do. How to upgrade an add-on covers the rest of the upgrade.
If nothing looks wrong here but the feature is still missing, work through Installed an add-on but nothing shows up?
Still stuck? Open a support ticket with the add-on name, your style's name and version, and a screenshot of the template modification log.