Arty
Well-known member
When importing style, if template's version_id has changed, but content hasn't changed, XenForo doesn't update last_edit_date of that template and shows it as outdated.
That happens very often when updating style for latest version of XenForo or any add-on - sometimes there is nothing to change in template other than bumping version number.
Issue is caused by template data writer. It updates last_edit_date only if template content was changed, ignoring changes to other properties. I think it should update last_edit_date when version_id is updated as well.
Fix: in library/XenForo/DataWriter/Template.php find
replace with
That happens very often when updating style for latest version of XenForo or any add-on - sometimes there is nothing to change in template other than bumping version number.
Issue is caused by template data writer. It updates last_edit_date only if template content was changed, ignoring changes to other properties. I think it should update last_edit_date when version_id is updated as well.
Fix: in library/XenForo/DataWriter/Template.php find
Code:
if ($this->isChanged('template') && !$this->isChanged('last_edit_date'))
Code:
if (($this->isChanged('template') || $this->isChanged('version_id')) && !$this->isChanged('last_edit_date'))