U4-3508 - Template ToXml uses localized name making template packaging invalid

Created by Lars-Erik Aabech 13 Nov 2013, 10:40:34 Updated by Shannon Deminick 21 Jun 2017, 07:58:45

umbraco.cms.businesslogic.template.Template ToXml (line 288) uses this.Text, which substitutes base.Text with a translated name from the dictionary, if prefixed with #. (line 106) This leads to templates being exported with their localized names instead of the "real" name. Template.Import did the same mistake with the generated file on import, but it's been fixed in PackagingService. USync however still use Template.Import, so it needs to be refactored to use PackagingService.ImportTemplates. The latter has a nullreference exception when trying to import one template. (XElement("template")). Template.ToXml is only used by CreatedPackage.Publish, which is only used by packages._Default.saveOrPublish, so it should be pretty safe to replace Template line 291 with base.Text. (line numbers from 6.2 as of this date)


Shannon Deminick 21 Jun 2017, 07:58:46

Closing issue due to inactivity - see blog post for details https://umbraco.com/blog/issue-tracker-cleanup/

Priority: Normal

Type: Bug

State: Closed


Difficulty: Normal

Category: Localization

Backwards Compatible: True

Fix Submitted:

Affected versions: 6.2.0

Due in version:


Story Points: