hhuijser/liferay-portal — pull request #1913 by yuhai (2014-05-29 13:53:32+00:00)
Title: LPS-47077 TemplateNameException occurred when importing an LAR file.

The issue occurs when import one webcontent.lar in one site and the template name's language(en_AU) of webcontent.lar is not the same as this site's default language(nl_NL). In addition, portal's default Language is different(is fr_FR and is not nl_NL).

By default, we added portal's default Language's value for this lar so that the issue occured in DDMTemplateLocalServiceImpl.validateName(Map nameMap) method

###
String name = nameMap.get(LocaleUtil.getSiteDefault());
//name is null
###

Refer to LPS-38036's fix, one commit "Get the default locale of the site when using DDM and DDL" of all commits, so if data's language of webcontent.lar don't match in the current site's default language, we should use site default language instead of portal default language to add related data when import one lar.

Thanks,
Hai