An error occurred while processing the template.
Java method "com.liferay.journal.util.impl.JournalContentImpl.getContent(long, String, String, String)" threw an exception when invoked on com.liferay.journal.util.impl.JournalContentImpl object "[email protected]"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: ${journalContent.getContent(groupId?l...  [in template "ARTICLE_UTILITIES" in macro "get_journal_article_content" at line 70, column 17]
	- Reached through: @get_journal_article_content article  [in template "ARTICLE_UTILITIES" in macro "embed_journal_article" at line 61, column 17]
	- Reached through: @article_utilities.embed_journal_arti...  [in template "10155#10195#RESOURCE_RENDERER" at line 134, column 25]
----
1<#include "${templatesPath}/components"> 
2 
3<#assign asset_category_local_service = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") /> 
4<#assign asset_entry_local_service = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
5<#assign asset_link_local_service = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService") /> 
6<#assign asset_vocabulary_local_service = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService") /> 
7<#assign dl_file_entry_local_service = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") /> 
8<#assign journal_article_local_service = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 
9<#assign portlet_file_repository_util = objectUtil("com.liferay.portal.kernel.portletfilerepository.PortletFileRepositoryUtil") /> 
10 
11<#assign service_context = objectUtil("com.liferay.portal.kernel.service.ServiceContextThreadLocal").getServiceContext() /> 
12 
13<#assign http_servlet_request = service_context.getRequest() /> 
14 
15<#assign theme_display = service_context.getThemeDisplay() /> 
16 
17<#assign plid = theme_display["plid"]?number /> 
18 
19<#assign folder_id = paramUtil.getLong(http_servlet_request, "folderId") /> 
20<#assign resource_id = paramUtil.getLong(http_servlet_request, "resourceId") /> 
21<#assign title = paramUtil.getString(http_servlet_request, "title") /> 
22<#assign passed_gated = paramUtil.getString(http_servlet_request, "gt") /> 
23 
24<#import "${templatesPath}/article_utilities" as article_utilities> 
25<#import "${templatesPath}/language_keys" as lang> 
26 
27<#assign has_update_permissions = article_utilities.has_update_permissions() /> 
28 
29<#function get_related_links class_name class_pk> 
30	<#assign asset_entry = asset_entry_local_service.getEntry(class_name, class_pk) /> 
31 
32	<#assign asset_entry_id = asset_entry.getEntryId() /> 
33 
34	<#assign related_links = asset_link_local_service.getDirectLinks(asset_entry_id) /> 
35 
36	<#return related_links> 
37</#function> 
38 
39<#assign vocabularies = ["Industry","Resource Type","Solution","Topic"] /> 
40 
41<#function map_categories categories> 
42	<#assign categories_map = {} /> 
43 
44	<#list categories as category> 
45		<#assign category_name = category.getName() /> 
46		<#assign vocabulary_name = asset_vocabulary_local_service.getVocabulary(category.getVocabularyId()).getName() /> 
47 
48		<#if vocabularies?seq_contains(vocabulary_name)> 
49			<#if categories_map[vocabulary_name]?has_content> 
50				<#assign categories_map = categories_map + {vocabulary_name: categories_map[vocabulary_name] + [category_name]} /> 
51			<#else> 
52				<#assign categories_map = categories_map + {vocabulary_name: [category_name]} /> 
53			</#if> 
54		</#if> 
55	</#list> 
56 
57	<#return categories_map /> 
58</#function> 
59 
60<p class="standard-padding"> 
61	<style> 
62		.left-caret:hover svg { 
63			transform: translateX(-0.5em); 
64
65	</style> 
66	<a class="cta left-caret small-caps" href="/resources"> 
67		<svg height="10" width="6"><use xlink:href="#leftCaret"></use></svg> 
68 
69		${languageUtil.format(locale, "back-to-x", languageUtil.get(locale, "resources"))} 
70	</a> 
71</p> 
72 
73<div class="resource-display"> 
74	<#if dl_file_entry_local_service.fetchFileEntry(groupId, folder_id, title)??> 
75		<#assign dl_file_entry = dl_file_entry_local_service.fetchFileEntry(groupId, folder_id, title) /> 
76	<#elseif dl_file_entry_local_service.fetchDLFileEntry(resource_id)??> 
77		<#assign dl_file_entry = dl_file_entry_local_service.fetchDLFileEntry(resource_id) /> 
78	</#if> 
79 
80	<#if journal_article_local_service.fetchArticleByUrlTitle(groupId, title)??> 
81		<#assign article = journal_article_local_service.fetchArticleByUrlTitle(groupId, title) /> 
82	<#elseif journal_article_local_service.fetchArticle(groupId, resource_id?string)??> 
83		<#assign article = journal_article_local_service.fetchArticle(groupId, resource_id?string) /> 
84	</#if> 
85 
86	<#assign entries = [] /> 
87	<#assign related_links = [] /> 
88 
89	<#if article??> 
90		<#assign related_links = get_related_links("com.liferay.journal.model.JournalArticle", article.getResourcePrimKey()) /> 
91 
92		<#assign default_title = article.getTitle(locale) + " | " + company.getName() /> 
93		<#assign expando_bridge = article.getExpandoBridge() /> 
94 
95		<#assign age_of_article = (.now?long - article.displayDate?long) / (1000 * 60 * 60 * 24) /> 
96		<#assign hubspot_form_article_id = "230289858" /> 
97 
98		<#assign document = saxReaderUtil.read(article.getContent()) /> 
99 
100		<#assign company_name = document.selectSingleNode("//dynamic-element[@name='company_name']/dynamic-content")! /> 
101		<#assign gated_teaser_content = document.selectSingleNode("//dynamic-element[@name='gated_teaser_content']/dynamic-content")! /> 
102		<#assign is_gated = document.selectSingleNode("//dynamic-element[@name='is_gated']/dynamic-content")! /> 
103 
104		<#if (age_of_article < 90) && ((passed_gated != "true") && ((is_gated.getData())?? && (is_gated.getData() == "true")))> 
105			<div class="block-container justify-center large-padding max-lg"> 
106				<div class="block left-block text-center title-image w30"> 
107					<@resource_icon /> 
108				</div> 
109 
110				<div class="block right-block w70"> 
111					<#if company_name.getData()?has_content> 
112						<h1 class="title"> 
113							${company_name.getData()} 
114						</h1> 
115					</#if> 
116 
117					<#if gated_teaser_content.getData()?has_content> 
118						<div class="gated-teaser-content"> 
119							${gated_teaser_content.getData()} 
120						</div> 
121					</#if> 
122 
123					<#assign custom_resource_url = "/resource/" + title + "?gt=true" /> 
124 
125					<@liferay_portlet["runtime"] 
126						defaultPreferences="" 
127						instanceId="${hubspot_form_article_id}" 
128						portletName="com_liferay_journal_content_web_portlet_JournalContentPortlet" 
129						queryString="customResourceUrl=${htmlUtil.escapeURL(custom_resource_url)}" 
130					/> 
131				</div> 
132			</div> 
133		<#else> 
134			<@article_utilities.embed_journal_article article /> 
135		</#if> 
136	<#elseif dl_file_entry??> 
137		<#assign categories = map_categories(asset_category_local_service.getCategories("com.liferay.document.library.kernel.model.DLFileEntry", dl_file_entry.getPrimaryKey())) /> 
138		<#assign default_title = dl_file_entry.getTitle() + " | " + company.getName() /> 
139		<#assign dl_file_entry_url = "/documents/" + groupId + "/" + dl_file_entry.getFolderId() + "/" + dl_file_entry.getTitle() /> 
140		<#assign expando_bridge = dl_file_entry.getExpandoBridge() /> 
141		<#assign hubspot_form_article_id = "691288" /> 
142		<#assign related_links = get_related_links("com.liferay.document.library.kernel.model.DLFileEntry", dl_file_entry.getPrimaryKey()) /> 
143 
144		<div class="block-container"> 
145			<div class="block long-form"> 
146				<#assign fieldsMap = dl_file_entry.getDDMFormValuesMap(dl_file_entry.getFileVersion().getFileVersionId()) /> 
147 
148				<#list fieldsMap?values as field> 
149					<#assign title = dl_file_entry.getTitle() /> 
150					<#assign display_title = fieldsMap["display_title"]! /> 
151 
152					<#assign cover_image = (field.getDDMFormFieldValuesMap().get("cover_image"))! /> 
153 
154					<#if display_title?has_content && display_title.getValue()?has_content> 
155						<#assign title = display_title.getValue() /> 
156					</#if> 
157				</#list> 
158 
159				<h1 class="long-form-title title w70"> 
160					${title} 
161				</h1> 
162 
163				<div class="block-container description-sidebar-wrapper flex-row-reverse no-padding"> 
164					<div class="block sidebar-info w30"> 
165						<#if categories?size gt 0> 
166							<@Sidebar title="Details"> 
167								<#list vocabularies as vocabulary> 
168									<#assign list = "" /> 
169 
170									<#if categories[vocabulary]?has_content> 
171										<#list categories[vocabulary] as category> 
172											<#if list?has_content> 
173												<#assign list = list + ", " + category /> 
174											<#else> 
175												<#assign list = category /> 
176											</#if> 
177										</#list> 
178 
179										<@InfoGroup direction="vertical" key="${vocabulary}" value="${list}" /> 
180									</#if> 
181								</#list> 
182							</@Sidebar> 
183						</#if> 
184 
185						<@SocialMediaIcons alignment="left" mode="share" title="Share this post" networks="facebook,twitter,linkedin" /> 
186					</div> 
187 
188					<div class="block regular-content w70"> 
189						<p class="description "> 
190							${dl_file_entry.getDescription()} 
191						</p> 
192 
193						<div class="block title-image" style="max-width:602px;"> 
194							<#assign version = dl_file_entry.getFileVersion()["version"] /> 
195							<#assign uuid = dl_file_entry.getUuid() /> 
196 
197							<object class="document-image-preview" data="/documents/${groupId}/${folder_id}/${title}/${uuid}/?version=${version}&previewFileIndex=1" type="image/png"> 
198								<@resource_icon /> 
199							</object> 
200						</div> 
201					</div> 
202				</div> 
203 
204				<#assign embed_asset_id = dl_file_entry.getFileEntryId() /> 
205 
206				<#assign VOID = freeMarkerPortletPreferences.setValue("articleId", hubspot_form_article_id) /> 
207 
208				<@liferay_portlet["runtime"] 
209					defaultPreferences=freeMarkerPortletPreferences.toString() 
210					instanceId="123423423" 
211					portletName="com_liferay_journal_content_web_portlet_JournalContentPortlet" 
212					queryString="assetId=${embed_asset_id}" 
213				/> 
214 
215				<div class="large-padding-vertical sharing-mobile"> 
216					<@SocialMediaIcons alignment="center" mode="share" networks="facebook,linkedin,twitter" title="" /> 
217				</div> 
218			</div> 
219		</div> 
220	<#else> 
221		<p class="standard-padding"> 
222			${lang.localize("resource_not_found", "Resource not found.")} 
223		</p> 
224	</#if> 
225 
226	<#list related_links as entry> 
227		<#if entry_index < 3> 
228			<#assign related_asset_entry_id = entry.getEntryId2() /> 
229 
230			<#assign related_asset_entry = asset_entry_local_service.getEntry(related_asset_entry_id) /> 
231 
232			<#assign entries = entries + [related_asset_entry] /> 
233		</#if> 
234	</#list> 
235 
236	<#if entries?size gt 0> 
237		<div class="related-link section-padding"> 
238			<h3 class="text-center"> 
239				${lang.localize("you_might_be_interested_in", "You might be interested in...")} 
240			</h3> 
241 
242			<div class="resource-template standard-padding-vertical"> 
243				<#include "${templatesPath}/RESOURCES" /> 
244			</div> 
245		</div> 
246	</#if> 
247 
248	<#if expando_bridge??> 
249		<@article_utilities.set_seo_from_expando_bridge expando_bridge default_title companyId /> 
250	</#if> 
251</div> 
252 
253<#macro resource_icon> 
254	<svg class="document-image-preview" viewBox="0 0 145 188" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 
255		<path class="secondary-fill" d="M144,118l-69,69h66.1c1.6,0,2.9-1.3,2.9-2.9V118z"/> 
256		<polygon class="alt-secondary-fill" points="75,187 135.3,187 105.1,156.9 "/> 
257		<path class="primary-fill" d="M83,1l61,61V4c0-1.7-1.3-3-3-3H83z"/> 
258		<polygon class="accent-fill" points="144,62 144,25.1 125.5,43.5 "/> 
259		<path class="element-stroke transparent-fill" d="M141.5,187.5H3.5c-1.6,0-3-1.4-3-3V3.5c0-1.6,1.4-3,3-3h138c1.6,0,3,1.4,3,3v181 C144.5,186.1,143.1,187.5,141.5,187.5z"/> 
260 
261		<svg viewBox="-.25 0 270 90" width="80%" x="10%"> 
262			<use xlink:href="#liferayLogo"></use> 
263		</svg> 
264	</svg> 
265</#macro> 
266 
267<style> 
268	.resource-display ul { 
269		margin-left: 1.75rem; 
270
271 
272	.resource-display .document-image-preview { 
273		margin-bottom: 3rem; 
274		max-width: 100%; 
275
276 
277	.resource-display .regular-content { 
278		padding-right: 3em; 
279
280 
281	.resource-display .sharing-mobile { 
282		display: none; 
283
284 
285	.resource-display .title-image { 
286		max-width: 600px; 
287		width: 100%; 
288
289 
290	@media all and (max-width: 768px) { 
291		.resource-display .regular-content { 
292			padding-right: initial; 
293
294 
295		.resource-display .sharing-mobile { 
296			display: block; 
297
298 
299		.resource-display .sidebar-info .social-media-icons { 
300			display: none; 
301
302
303</style>