54
54
import com .liferay .portal .kernel .service .ServiceContext ;
55
55
import com .liferay .portal .kernel .util .*;
56
56
import com .liferay .portal .kernel .workflow .WorkflowConstants ;
57
+ import com .liferay .portlet .display .template .PortletDisplayTemplate ;
57
58
import com .mimacom .liferay .portal .setup .LiferaySetup ;
58
59
import com .mimacom .liferay .portal .setup .core .util .ResolverUtil ;
59
60
import com .mimacom .liferay .portal .setup .core .util .ResourcesUtil ;
@@ -348,7 +349,7 @@ public static void addDDMTemplate(final Adt template, final long groupId)
348
349
LOG .info ("Adding ADT " + template .getName ());
349
350
long classNameId = PortalUtil .getClassNameId (template .getClassName ());
350
351
351
- long resourceClassnameId = Validator .isBlank (template .getResourceClassName ()) ? ClassNameLocalServiceUtil .getClassNameId (JournalArticle .class )
352
+ long resourceClassnameId = Validator .isBlank (template .getResourceClassName ()) ? ClassNameLocalServiceUtil .getClassNameId (PortletDisplayTemplate .class )
352
353
: ClassNameLocalServiceUtil .getClassNameId (template .getResourceClassName ());
353
354
354
355
Map <Locale , String > nameMap = new HashMap <Locale , String >();
@@ -366,7 +367,7 @@ public static void addDDMTemplate(final Adt template, final long groupId)
366
367
DDMTemplate ddmTemplate = null ;
367
368
try {
368
369
ddmTemplate = DDMTemplateLocalServiceUtil .fetchTemplate (groupId , classNameId ,
369
- template .getTemplateKey ());
370
+ template .getTemplateKey (), true );
370
371
} catch (SystemException e ) {
371
372
LOG .error ("Error while trying to find ADT with key: " + template .getTemplateKey ());
372
373
}
0 commit comments