Cannot reproduce Can't auto merge changes after add-on update

CyberAP

Well-known member
I have custom templates in some add-on, after add-on update they became outdated, but I can't merge changes automatically. These templates were changed within 30 days, so they all have proper edit history.
When I click on 'Merge Changes' I get:

The custom template is out of date but has been edited more recently than the parent. Merging can only be done by hand.

If I go straight to the template I have 'View Custom Changes' and 'View History' buttons. Here is outdated templates list:

templ_lst.webp

I'm on XF 1.2.2, but this also happened on 1.2.1.
 
I can't reproduce this. I've created a simple add-on, customized the template in a style and then upgraded the add-on with a newer version that changed the template. The template then showed up as out of date and could be merged. I've attached the add-on (both versions) here.

However, I note one thing in your screenshot that's very important: it's showing versions rather than edit dates. This likely indicates that there's no last edit date for the parent version of the template (or the custom version was edited more recently).

Was this add-on installed in 1.1? If so, was the last update before upgrading to 1.2? If that's true, then you can't merge because the necessary data isn't there. I think if you installed in 1.1 and upgraded in 1.2 that should still be fine.

I suppose another edge case could be that the template version changed, but nothing actually changed in the template, so it hasn't triggered edit date updates. I may need to update the edit date for that case as well. (If you can confirm whether that's the case here, that'd be helpful.
 

Attachments

Add-on was probably installed on a 'pre 1.2 XF version', update was on 1.2. About templates: I can't really remember when the last edit was done, but it's very likely it was on 1.2. I can confirm that add-on templates in 1.1.1 and 1.1.2 are different, so there were changes that I wanted to merge. My guess is that my template had version ID higher than authors one.

Export data:

Template in my style:

Code:
<template title="sonnb_xengallery_stream_view" addon_id="sonnb_xengallery" version_id="10101" version_string="1.1.1" disable_modifications="0"><![CDATA[

Template from add-on XML:

Code:
<template title="sonnb_xengallery_stream_view" version_id="10102" version_string="1.1.2"><![CDATA[
 
If you (or anyone) see this happen after updating an add-on, can you export your xf_template and xf_template_history tables? I'm unable to reproduce this and nothing is jumping out as to an explicit cause.
 
Top Bottom