An error occurred while processing the template.
Java method "com.liferay.osb.www.journal.cache.util.impl.OSBJournalContentImpl.getContent(long, String, String, String)" threw an exception when invoked on com.liferay.osb.www.journal.cache.util.impl.OSBJournalContentImpl object "co[email protected]54cd5fc6"; 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 158, 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 
67	<a class="cta left-caret small-caps" href="/resources"> 
68		<svg height="10" width="6"><use xlink:href="#leftCaret"></use></svg> 
69 
70		${languageUtil.format(locale, "back-to-x", languageUtil.get(locale, "resources"))} 
71	</a> 
72</p> 
73 
74<div class="resource-display"> 
75	<#if dl_file_entry_local_service.fetchFileEntry(groupId, folder_id, title)??> 
76		<#assign dl_file_entry = dl_file_entry_local_service.fetchFileEntry(groupId, folder_id, title) /> 
77	<#elseif dl_file_entry_local_service.fetchDLFileEntry(resource_id)??> 
78		<#assign dl_file_entry = dl_file_entry_local_service.fetchDLFileEntry(resource_id) /> 
79	</#if> 
80 
81	<#if journal_article_local_service.fetchArticleByUrlTitle(groupId, title)??> 
82		<#assign article = journal_article_local_service.fetchArticleByUrlTitle(groupId, title) /> 
83	<#elseif journal_article_local_service.fetchArticle(groupId, resource_id?string)??> 
84		<#assign article = journal_article_local_service.fetchArticle(groupId, resource_id?string) /> 
85	</#if> 
86 
87	<#assign entries = [] /> 
88	<#assign related_links = [] /> 
89 
90	<#if article??> 
91		<#assign related_links = get_related_links("com.liferay.journal.model.JournalArticle", article.getResourcePrimKey()) /> 
92 
93		<#assign default_title = article.getTitle(locale) + " | " + company.getName() /> 
94		<#assign expando_bridge = article.getExpandoBridge() /> 
95 
96		<#assign age_of_article = (.now?long - article.displayDate?long) / (1000 * 60 * 60 * 24) /> 
97		<#assign hubspot_form_article_id = "230289858" /> 
98 
99		<#assign document = saxReaderUtil.read(article.getContent()) /> 
100 
101		<#assign company_name = document.selectSingleNode("//dynamic-element[@name='company_name']/dynamic-content")! /> 
102		<#assign gated_teaser_content = document.selectSingleNode("//dynamic-element[@name='gated_teaser_content']/dynamic-content")! /> 
103		<#assign is_gated = document.selectSingleNode("//dynamic-element[@name='is_gated']/dynamic-content")! /> 
104 
105		<#if (age_of_article < 90) && ((passed_gated != "true") && ((is_gated.getData())?? && (is_gated.getData() == "true")))> 
106			<div class="block-container justify-center large-padding max-lg"> 
107				<div class="block left-block text-center title-image w30"> 
108					<@resource_icon /> 
109				</div> 
110 
111				<div class="block right-block w70"> 
112					<#if company_name.getData()?has_content> 
113						<h1 class="title"> 
114							${company_name.getData()} 
115						</h1> 
116					</#if> 
117 
118					<#if gated_teaser_content.getData()?has_content> 
119						<div class="gated-teaser-content"> 
120							${gated_teaser_content.getData()} 
121						</div> 
122					</#if> 
123 
124					<#assign custom_resource_url = "/resource/" + title + "?gt=true" /> 
125 
126					<#--  TODO: provide redirect option in hs js generator like this --> 
127						<#if query_string_custom_resource_url?? && query_string_custom_resource_url[0]?has_content> 
128							<#assign custom_resource_url = query_string_custom_resource_url[0] /> 
129 
130							<#-- get Article URL title--> 
131							<#assign beginning = custom_resource_url?last_index_of("/") /> 
132							<#assign end = custom_resource_url?index_of("?gt=true") /> 
133							<#assign url_title = custom_resource_url?substring(beginning + 1, end) /> 
134 
135							<#-- get Article title --> 
136							<#assign article = journal_article_local_service.fetchArticleByUrlTitle(groupId, url_title)! /> 
137							<#assign article_title = article.getTitle(locale) /> 
138 
139							<#if custom_resource_url?? && custom_resource_url != ""> 
140								<#assign VOID = asset_info.put("custom_resource_url", custom_resource_url) /> 
141							</#if> 
142 
143							<#if article??> 
144								<#assign VOID = asset_info.put("Recent Asset Name", article_title) /> 
145							</#if> 
146						</#if> 
147					<#--    --> 
148 
149					<@liferay_portlet["runtime"] 
150						defaultPreferences="" 
151						instanceId="${hubspot_form_article_id}" 
152						portletName="com_liferay_journal_content_web_portlet_JournalContentPortlet" 
153						queryString="customResourceUrl=${htmlUtil.escapeURL(custom_resource_url)}" 
154					/> 
155				</div> 
156			</div> 
157		<#else> 
158			<@article_utilities.embed_journal_article article /> 
159		</#if> 
160	<#elseif dl_file_entry??> 
161		<#assign categories = map_categories(asset_category_local_service.getCategories("com.liferay.document.library.kernel.model.DLFileEntry", dl_file_entry.getPrimaryKey())) /> 
162		<#assign default_title = dl_file_entry.getTitle() + " | " + company.getName() /> 
163		<#assign dl_file_entry_url = "/documents/" + groupId + "/" + dl_file_entry.getFolderId() + "/" + dl_file_entry.getTitle() /> 
164		<#assign expando_bridge = dl_file_entry.getExpandoBridge() /> 
165		<#assign hubspot_form_article_id = "691288" /> 
166		<#assign related_links = get_related_links("com.liferay.document.library.kernel.model.DLFileEntry", dl_file_entry.getPrimaryKey()) /> 
167 
168		<div class="block-container"> 
169			<div class="block long-form"> 
170				<#assign fieldsMap = dl_file_entry.getDDMFormValuesMap(dl_file_entry.getFileVersion().getFileVersionId()) /> 
171 
172				<#list fieldsMap?values as field> 
173					<#assign title = dl_file_entry.getTitle() /> 
174					<#assign display_title = fieldsMap["display_title"]! /> 
175 
176					<#assign cover_image = (field.getDDMFormFieldValuesMap().get("cover_image"))! /> 
177 
178					<#if display_title?has_content && display_title.getValue()?has_content> 
179						<#assign title = display_title.getValue() /> 
180					</#if> 
181				</#list> 
182 
183				<h1 class="long-form-title title w70"> 
184					${title} 
185				</h1> 
186 
187				<div class="block-container description-sidebar-wrapper flex-row-reverse no-padding"> 
188					<div class="block sidebar-info w30"> 
189						<#if categories?size gt 0> 
190							<@Sidebar title="Details"> 
191								<#list vocabularies as vocabulary> 
192									<#assign list = "" /> 
193 
194									<#if categories[vocabulary]?has_content> 
195										<#list categories[vocabulary] as category> 
196											<#if list?has_content> 
197												<#assign list = list + ", " + category /> 
198											<#else> 
199												<#assign list = category /> 
200											</#if> 
201										</#list> 
202 
203										<@InfoGroup direction="vertical" key="${vocabulary}" value="${list}" /> 
204									</#if> 
205								</#list> 
206							</@Sidebar> 
207						</#if> 
208 
209						<@SocialMediaIcons alignment="left" mode="share" title="Share this post" networks="facebook,twitter,linkedin" /> 
210					</div> 
211 
212					<div class="block regular-content w70"> 
213						<p class="description "> 
214							${dl_file_entry.getDescription()} 
215						</p> 
216 
217						<div class="block title-image" style="max-width:602px;"> 
218							<#assign version = dl_file_entry.getFileVersion()["version"] /> 
219							<#assign uuid = dl_file_entry.getUuid() /> 
220 
221							<object class="document-image-preview" data="/documents/${groupId}/${folder_id}/${title}/${uuid}/?version=${version}&previewFileIndex=1" type="image/png"> 
222								<@resource_icon /> 
223							</object> 
224						</div> 
225					</div> 
226				</div> 
227 
228				<#assign embed_asset_id = dl_file_entry.getFileEntryId() /> 
229 
230				<#assign VOID = freeMarkerPortletPreferences.setValue("articleId", hubspot_form_article_id) /> 
231 
232				<@liferay_portlet["runtime"] 
233					defaultPreferences=freeMarkerPortletPreferences.toString() 
234					instanceId="123423423" 
235					portletName="com_liferay_journal_content_web_portlet_JournalContentPortlet" 
236					queryString="assetId=${embed_asset_id}" 
237				/> 
238 
239				<div class="large-padding-vertical sharing-mobile"> 
240					<@SocialMediaIcons alignment="center" mode="share" networks="facebook,linkedin,twitter" title="" /> 
241				</div> 
242			</div> 
243		</div> 
244	<#else> 
245		<p class="standard-padding"> 
246			${lang.localize("resource_not_found", "Resource not found.")} 
247		</p> 
248	</#if> 
249 
250	<#list related_links as entry> 
251		<#if entry_index < 3> 
252			<#assign related_asset_entry_id = entry.getEntryId2() /> 
253 
254			<#assign related_asset_entry = asset_entry_local_service.getEntry(related_asset_entry_id) /> 
255 
256			<#assign entries = entries + [related_asset_entry] /> 
257		</#if> 
258	</#list> 
259 
260	<#if entries?size gt 0> 
261		<div class="related-link section-padding"> 
262			<h3 class="text-center"> 
263				${lang.localize("you_might_be_interested_in", "You might be interested in...")} 
264			</h3> 
265 
266			<div class="resource-template standard-padding-vertical"> 
267				<#include "${templatesPath}/RESOURCES" /> 
268			</div> 
269		</div> 
270	</#if> 
271 
272	<#if expando_bridge??> 
273		<@article_utilities.set_seo_from_expando_bridge expando_bridge default_title companyId /> 
274	</#if> 
275</div> 
276 
277<#macro resource_icon> 
278	<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"> 
279		<path class="secondary-fill" d="M144,118l-69,69h66.1c1.6,0,2.9-1.3,2.9-2.9V118z"/> 
280		<polygon class="alt-secondary-fill" points="75,187 135.3,187 105.1,156.9 "/> 
281		<path class="primary-fill" d="M83,1l61,61V4c0-1.7-1.3-3-3-3H83z"/> 
282		<polygon class="accent-fill" points="144,62 144,25.1 125.5,43.5 "/> 
283		<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"/> 
284 
285		<svg viewBox="-.25 0 270 90" width="80%" x="10%"> 
286			<use xlink:href="#liferayLogo"></use> 
287		</svg> 
288	</svg> 
289</#macro> 
290 
291<style> 
292	.resource-display ul { 
293		margin-left: 1.75rem; 
294
295 
296	.resource-display .document-image-preview { 
297		margin-bottom: 3rem; 
298		max-width: 100%; 
299
300 
301	.resource-display .regular-content { 
302		padding-right: 3em; 
303
304 
305	.resource-display .sharing-mobile { 
306		display: none; 
307
308 
309	.resource-display .title-image { 
310		max-width: 600px; 
311		width: 100%; 
312
313 
314	@media all and (max-width: 768px) { 
315		.resource-display .regular-content { 
316			padding-right: initial; 
317
318 
319		.resource-display .sharing-mobile { 
320			display: block; 
321
322 
323		.resource-display .sidebar-info .social-media-icons { 
324			display: none; 
325
326
327</style>