Fixed Automatic template merging fails if exactly the same change has already been applied

Steffen

Well-known member
Affected version
2.0.3
In XenForo 2.0.2, I fixed a bug by changing a template (2FA setup: "TypeError: $el.qrcode is not a function"). The exact same change was then shipped with XenForo 2.0.3.

So, in my installation, the template didn't really change with the update to XenForo 2.0.3. However, the template was listed as outdated after upgrading to XenForo 2.0.3. Clicking the "Merge" button resulted in an error: "The custom template is out of date but has been edited more recently than the parent. Merging can only be done by hand". Just saving the template again did not remove it from the list ouf outdated templates. I had to change something in the template (and then change it back) to make it disappear from the list of outdated templates.
 
Yeah you're right. The problem here is that we only update the template's version details on save, if certain values change. The value we'd normally expect to change when merging templates, of course, is the template field. But in the event that the custom and parent versions of the template are still the same, then this field doesn't change so it skips the version updates and then you still have a custom template which was edited prior to its parent - hence outdated.

So the simple solution here is to just update the version details manually, even if the template field hasn't changed, and that's what we've done for the next release, thanks.
 
Back
Top Bottom