News from FME ZeMe

News from FME ZeMe

Blogs

RSS
An error occurred while processing the template.
The following has evaluated to null or missing:
==> userLocalService.fetchUser(curBlogEntry.getUserId())  [in template "139202#4941134#1289478380" at line 107, column 109]

----
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: entryUser = userLocalService.fetchUse...  [in template "139202#4941134#1289478380" at line 107, column 97]
	- Reached through: #assign-container  [in template "139202#4941134#1289478380" at line 104, column 89]
----
1<div class="row widget-mode-card"> 
2	<#if entries?has_content> 
3		<#list entries as curBlogEntry> 
4			<#if curBlogEntry.getCoverImageURL(themeDisplay)??> 
5				<#assign cardImage = true /> 
6			<#else> 
7				<#assign cardImage = false /> 
8			</#if> 
9 
10			<div class="col-lg-4"> 
11				<div class="card"> 
12					<#if cardImage> 
13						<div class="card-header"> 
14							<div class="aspect-ratio aspect-ratio-8-to-3"> 
15								<img alt="thumbnail" class="aspect-ratio-item-center-middle aspect-ratio-item-fluid" src="${curBlogEntry.getCoverImageURL(themeDisplay)}"> 
16							</div> 
17						</div> 
18					</#if> 
19 
20					<div class="card-body widget-topbar"> 
21						<div class="autofit-row card-title"> 
22							<div class="autofit-col autofit-col-expand"> 
23								<#assign viewEntryPortletURL = renderResponse.createRenderURL() /> 
24 
25								${viewEntryPortletURL.setParameter("mvcRenderCommandName", "/blogs/view_entry")} 
26 
27								<#if validator.isNotNull(curBlogEntry.getUrlTitle())> 
28									${viewEntryPortletURL.setParameter("urlTitle", curBlogEntry.getUrlTitle())} 
29								<#else> 
30									${viewEntryPortletURL.setParameter("entryId", curBlogEntry.getEntryId()?string)} 
31								</#if> 
32 
33								<h3 class="title"> 
34									<a class="title-link" href="${viewEntryPortletURL.toString()}"> 
35									${htmlUtil.escape(blogsEntryUtil.getDisplayTitle(resourceBundle, curBlogEntry))}</a> 
36								</h3> 
37							</div> 
38 
39							<div class="autofit-col visible-interaction"> 
40								<div class="dropdown dropdown-action"> 
41									<@liferay_ui["icon-menu"] 
42										direction="left-side" 
43										icon="" 
44										markupView="lexicon" 
45										message="" 
46										showWhenSingleIcon=true 
47
48										<#if blogsEntryPermission.contains(permissionChecker, curBlogEntry, "UPDATE")> 
49											<#assign editEntryPortletURL = renderResponse.createRenderURL() /> 
50 
51											${editEntryPortletURL.setWindowState(windowStateFactory.getWindowState("MAXIMIZED"))} 
52											${editEntryPortletURL.setParameter("mvcRenderCommandName", "/blogs/edit_entry")} 
53											${editEntryPortletURL.setParameter("redirect", currentURL)} 
54											${editEntryPortletURL.setParameter("entryId", curBlogEntry.getEntryId()?string)} 
55 
56											<@liferay_ui["icon"] 
57												label=true 
58												message="edit" 
59												url=editEntryPortletURL.toString() 
60											/> 
61										</#if> 
62										<#if blogsEntryPermission.contains(permissionChecker, curBlogEntry, "PERMISSIONS")> 
63											<#assign permissionsEntryURL = permissionsURLTag.doTag(null, "com.liferay.blogs.model.BlogsEntry", blogsEntryUtil.getDisplayTitle(resourceBundle, curBlogEntry), curBlogEntry.getGroupId()?string, curBlogEntry.getEntryId()?string, windowStateFactory.getWindowState("POP_UP").toString(), null, request) /> 
64 
65											<@liferay_ui["icon"] 
66												label=true 
67												message="permissions" 
68												method="get" 
69												url=permissionsEntryURL 
70												useDialog=true 
71											/> 
72										</#if> 
73										<#if blogsEntryPermission.contains(permissionChecker, curBlogEntry, "DELETE")> 
74											<#assign deleteEntryPortletURL = renderResponse.createActionURL() /> 
75 
76											${deleteEntryPortletURL.setParameter("javax.portlet.action", "/blogs/edit_entry")} 
77											${deleteEntryPortletURL.setParameter("cmd", trashHelper.isTrashEnabled(themeDisplay.getScopeGroupId())?then("move_to_trash", "delete"))} 
78											${deleteEntryPortletURL.setParameter("redirect", currentURL)} 
79											${deleteEntryPortletURL.setParameter("entryId", curBlogEntry.getEntryId()?string)} 
80 
81											<@liferay_ui["icon-delete"] 
82												label=true 
83												trash=trashHelper.isTrashEnabled(themeDisplay.getScopeGroupId()) 
84												url=deleteEntryPortletURL.toString() 
85											/> 
86										</#if> 
87									</@> 
88								</div> 
89							</div> 
90						</div> 
91 
92						<div class="autofit-row widget-metadata"> 
93							<div class="autofit-col inline-item-before"> 
94								<@liferay_ui["user-portrait"] 
95									userId=curBlogEntry.userId 
96									userName=curBlogEntry.userName 
97								/> 
98							</div> 
99 
100							<div class="autofit-col autofit-col-expand"> 
101								<div class="autofit-row"> 
102									<div class="autofit-col autofit-col-expand"> 
103										<#if serviceLocator??> 
104											<#assign 
105												userLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.UserLocalService") 
106 
107												entryUser = userLocalService.fetchUser(curBlogEntry.getUserId()) 
108											/> 
109 
110											<#if entryUser?? && !entryUser.isDefaultUser()> 
111												<#assign entryUserURL = entryUser.getDisplayURL(themeDisplay) /> 
112											</#if> 
113										</#if> 
114 
115										<div class="text-truncate-inline"> 
116											<a href="${(entryUserURL?? && validator.isNotNull(entryUserURL))?then(entryUserURL, "")}" class="text-truncate username">${curBlogEntry.getUserName()}</a> 
117										</div> 
118 
119										<div> 
120											${dateUtil.getDate(curBlogEntry.getStatusDate(), "dd MMM", locale)} 
121 
122											<#if blogsPortletInstanceConfiguration.enableReadingTime()> 
123												- <@liferay_reading_time["reading-time"] displayStyle="simple" model=curBlogEntry /> 
124											</#if> 
125 
126											<#if serviceLocator??> 
127												<#assign 
128													assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") 
129 
130													assetEntry = assetEntryLocalService.getEntry("com.liferay.blogs.model.BlogsEntry", curBlogEntry.getEntryId()) 
131												/> 
132 
133												<#if blogsPortletInstanceConfiguration.enableViewCount()> 
134													- <@liferay_ui["message"] arguments=assetEntry.getViewCount() key=(assetEntry.getViewCount()==0)?then("x-view", "x-views") /> 
135												</#if> 
136											</#if> 
137										</div> 
138									</div> 
139								</div> 
140							</div> 
141						</div> 
142 
143						<#if cardImage> 
144							<p class="widget-resume">${stringUtil.shorten(htmlUtil.stripHtml(curBlogEntry.getContent()), 150)}</p> 
145						<#else> 
146							<p class="widget-resume">${stringUtil.shorten(htmlUtil.stripHtml(curBlogEntry.getContent()), 400)}</p> 
147						</#if> 
148					</div> 
149 
150					<div class="card-footer"> 
151						<div class="card-row"> 
152							<div class="autofit-float autofit-row autofit-row-center widget-toolbar"> 
153								<#if blogsPortletInstanceConfiguration.enableComments()> 
154									<div class="autofit-col"> 
155										<#assign viewCommentsPortletURL = renderResponse.createRenderURL() /> 
156 
157										${viewCommentsPortletURL.setParameter("mvcRenderCommandName", "/blogs/view_entry")} 
158										${viewCommentsPortletURL.setParameter("scroll", renderResponse.getNamespace() + "discussionContainer")} 
159 
160										<#if validator.isNotNull(curBlogEntry.getUrlTitle())> 
161											${viewCommentsPortletURL.setParameter("urlTitle", curBlogEntry.getUrlTitle())} 
162										<#else> 
163											${viewCommentsPortletURL.setParameter("entryId", curBlogEntry.getEntryId()?string)} 
164										</#if> 
165 
166										<a class="btn btn-outline-borderless btn-outline-secondary btn-sm" href="${viewCommentsPortletURL.toString()}"> 
167											<span class="inline-item inline-item-before"> 
168												<@clay["icon"] symbol="comments" /> 
169											</span> ${commentManager.getCommentsCount("com.liferay.blogs.model.BlogsEntry", curBlogEntry.getEntryId())} 
170										</a> 
171									</div> 
172								</#if> 
173 
174								<#if blogsPortletInstanceConfiguration.enableRatings()> 
175									<div class="autofit-col"> 
176										<@liferay_ui["ratings"] 
177											className="com.liferay.blogs.model.BlogsEntry" 
178											classPK=curBlogEntry.getEntryId() 
179										/> 
180									</div> 
181								</#if> 
182 
183								<div class="autofit-col autofit-col-end"> 
184									<#assign bookmarkURL = renderResponse.createRenderURL() /> 
185 
186									${bookmarkURL.setWindowState(windowStateFactory.getWindowState("NORMAL"))} 
187									${bookmarkURL.setParameter("mvcRenderCommandName", "/blogs/view_entry")} 
188 
189									<#if validator.isNotNull(curBlogEntry.getUrlTitle())> 
190										${bookmarkURL.setParameter("urlTitle", curBlogEntry.getUrlTitle())} 
191									<#else> 
192										${bookmarkURL.setParameter("entryId", curBlogEntry.getEntryId()?string)} 
193									</#if> 
194 
195									<@liferay_social_bookmarks["bookmarks"] 
196										className="com.liferay.blogs.model.BlogsEntry" 
197										classPK=curBlogEntry.getEntryId() 
198										maxInlineItems=0 
199										target="_blank" 
200										title=blogsEntryUtil.getDisplayTitle(resourceBundle, curBlogEntry) 
201										types=blogsPortletInstanceConfiguration.socialBookmarksTypes() 
202										url=portalUtil.getCanonicalURL(bookmarkURL.toString(), themeDisplay, themeDisplay.getLayout()) 
203									/> 
204								</div> 
205							</div> 
206						</div> 
207					</div> 
208				</div> 
209			</div> 
210		</#list> 
211	</#if> 
212</div>