diff --git a/dotCMS/src/main/webapp/html/portlet/ext/contentlet/view_contentlets.jsp b/dotCMS/src/main/webapp/html/portlet/ext/contentlet/view_contentlets.jsp index 87ac51c3a2a4..78a5ca231350 100644 --- a/dotCMS/src/main/webapp/html/portlet/ext/contentlet/view_contentlets.jsp +++ b/dotCMS/src/main/webapp/html/portlet/ext/contentlet/view_contentlets.jsp @@ -59,7 +59,6 @@ String structureSelected = null; final String variableName = (String) request.getParameter("filter"); - String velocityVarName = null; if(UtilMethods.isSet(variableName)){ if (com.dotmarketing.beans.Host.HOST_VELOCITY_VAR_NAME.equals(variableName)){ @@ -68,7 +67,7 @@ try { ContentType filterContentType = APILocator.getContentTypeAPI(user).find(variableName); structureSelected = filterContentType != null ? filterContentType.id() : null; - velocityVarName = filterContentType.variable(); + } catch (NotFoundInDbException e) { structureSelected = null; } @@ -79,7 +78,6 @@ try { ContentType contentType = APILocator.getContentTypeAPI(user).find(structureSelected); - velocityVarName = contentType.variable(); if (contentType != null && com.dotmarketing.beans.Host.HOST_VELOCITY_VAR_NAME.equals(contentType.variable()) ){ structureSelected = null; @@ -572,7 +570,7 @@ label: "<%= UtilMethods.escapeSingleQuotes(LanguageUtil.get(pageContext, "Add-New-Content" )) %>", iconClass: "plusIcon", onClick: function() { - addNewContentlet(null, "<%= velocityVarName %>"); + addNewContentlet(null); } }); menu.addChild(menuItem1); @@ -781,7 +779,7 @@ }