IFAD Asset Request Portlet

Asset Publisher

An error occurred while processing the template.
The following has evaluated to null or missing:
==> publication_related_label  [in template "10154#10192#CORPORATE" at line 209, column 11]

----
Tip: If the failing expression is known to 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: #if (publication_related_label.getSib...  [in template "10154#10192#CORPORATE" at line 209, column 5]
----
1<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
2<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 
3<#assign assetVocabularyLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")/> 
4 
5<#assign article = journalArticleLocalService.getArticle(articleGroupId, .vars['reserved-article-id'].data) /> 
6 
7<#assign asset = assetEntryLocalService.getEntry('com.liferay.journal.model.JournalArticle', article.resourcePrimKey) > 
8 
9<#assign voc_type = assetVocabularyLocalService.getGroupVocabulary(company.getGroupId(), "Document_type")/> 
10<#assign voc_topic = assetVocabularyLocalService.getGroupVocabulary(company.getGroupId(), "Topics")/> 
11<#assign voc_region = assetVocabularyLocalService.getGroupVocabulary(company.getGroupId(), "Regions") /> 
12<#assign voc_country = assetVocabularyLocalService.getGroupVocabulary(company.getGroupId(), "Countries") /> 
13<#assign voc_project = assetVocabularyLocalService.getGroupVocabulary(company.getGroupId(), "Project")/> 
14 
15<#assign projectNo = "0"> 
16 
17<div class="publication-structure"> 
18    <div class="publication-content container"> 
19        <div class="row container"> 
20            <div class="col-md-10 offset-md-1 row generic-container"> 
21                <div class="col-md-6"> 
22                    <div class="pub-header"> 
23                        <p class="pub-type">${publication_type.data}</p> 
24                        <h1>${abstract_title.getData()}</h1> 
25 
26                        <#list asset.getCategories() as category> 
27                            <#if category.getVocabularyId() == voc_project.getVocabularyId() && 
28                            category.getName() != "0000" && category.getName() != "0"> 
29 
30                                <#assign projectNo = category.getName()> 
31 
32                                <h3><@liferay.language key="project" />: ${category.getDescription(locale)}</h3> 
33                            </#if> 
34                        </#list> 
35 
36                    </div> 
37 
38                    <div class="main-content"> 
39                        ${main_content.getData()} 
40                    </div> 
41                </div> 
42 
43                <div class="col-md-5 offset-md-1"> 
44                    <div class="pub-shadowbox py-3"> 
45                        <div class="pub-image"> 
46                            <#if publication_cover?? && publication_cover.getData()?has_content> 
47                                <img class="pub-hero-image" src="${publication_cover.getData()}"/> 
48                            </#if> 
49                        </div> 
50 
51                        <#assign documentTypes = []> 
52 
53                        <#list asset.getCategories() as category> 
54                            <#if category.getVocabularyId() == voc_type.getVocabularyId()> 
55                                <#assign documentTypes = documentTypes + [category.getDescription(locale)]> 
56                            </#if> 
57                        </#list> 
58 
59                        <#if (documentTypes?size > 0)> 
60                            <div class="pub-row"> 
61                                <p class="pub-row-title"><@liferay.language key="type" /></p> 
62                                <p class="pub-row-text"> 
63                                    ${documentTypes?join(", ")} 
64                                </p> 
65                            </div> 
66                        </#if> 
67 
68                        <#if projectNo != "0" && projectNo != "0000"> 
69                            <div class="pub-row"> 
70                                <p class="pub-row-title"><@liferay.language key="project-number" /></p> 
71                                <p class="pub-row-text"> 
72                                    <a href="/web/operations/-/project/${projectNo}">${projectNo}</a> 
73                                </p> 
74                            </div> 
75                        </#if> 
76 
77                        <#if publication_date?? && publication_date.getData()?has_content> 
78                            <div class="pub-row"> 
79                                <p class="pub-row-title"><@liferay.language key="date" /></p> 
80                                <p class="pub-row-text">${publication_date.getData()}</p> 
81                            </div> 
82                        </#if> 
83 
84                        <#if publication_publisher?? && publication_publisher.getData()?has_content> 
85                            <div class="pub-row"> 
86                                <p class="pub-row-title"><@liferay.language key="publisher" /></p> 
87                                <p class="pub-row-text">${publication_publisher.getData()}</p> 
88                            </div> 
89                        </#if> 
90 
91                        <#if publication_author?? && publication_author.getData()?has_content> 
92                            <div class="pub-row"> 
93                                <p class="pub-row-title"><@liferay.language key="author" /></p> 
94                                <p class="pub-row-text">${publication_author.getData()}</p> 
95                            </div> 
96                        </#if> 
97 
98                        <#-- Topics --> 
99 
100                        <#assign topics = []> 
101 
102                        <#list asset.getCategories() as category> 
103                            <#if category.getVocabularyId() == voc_topic.getVocabularyId()> 
104                                <#assign topics = topics + [category.getDescription(locale)]> 
105                            </#if> 
106                        </#list> 
107 
108                        <#if (topics?size > 0)> 
109                            <div class="pub-row"> 
110                                <p class="pub-row-title"><@liferay.language key="topic" /></p> 
111                                <p class="pub-row-text"> 
112                                    ${topics?join(", ")} 
113                                </p> 
114                            </div> 
115                        </#if> 
116 
117                        <#-- Regions --> 
118 
119                        <#assign regions = []> 
120 
121                        <#list asset.getCategories() as category> 
122                            <#if category.getVocabularyId() == voc_region.getVocabularyId()> 
123                                <#assign regions = regions + [category.getDescription(locale)]> 
124                            </#if> 
125                        </#list> 
126 
127                        <#if (regions?size > 0)> 
128                            <div class="pub-row"> 
129                                <p class="pub-row-title"><@liferay.language key="region" /></p> 
130                                <p class="pub-row-text"> 
131                                    ${regions?join(", ")} 
132                                </p> 
133                            </div> 
134                        </#if> 
135 
136                        <#-- Countries --> 
137 
138                        <#assign countries = []> 
139 
140                        <#list asset.getCategories() as category> 
141                            <#if category.getVocabularyId() == voc_country.getVocabularyId()> 
142                                <#assign countries = countries + [category]> 
143                            </#if> 
144                        </#list> 
145 
146                        <#if (countries?size > 0)> 
147                            <div class="pub-row"> 
148                                <p class="pub-row-title"><@liferay.language key="countries" /></p> 
149                                <p class="pub-row-text"> 
150                                    <#list countries as country> 
151                                        <a href="/web/operations/-/country/${country.getName()}"> 
152                                            <span class="tags"> 
153                                                ${country.getDescription(locale)} 
154                                            </span> 
155                                        </a> 
156                                    </#list> 
157                                </p> 
158                            </div> 
159                        </#if> 
160 
161                        <#if publication_citation?? && publication_citation.getData()?has_content> 
162                            <div class="pub-row"> 
163                                <p class="pub-row-title"><@liferay.language key="citation" /></p> 
164                                <p class="pub-row-text">${publication_citation.getData()}</p> 
165                            </div> 
166                        </#if> 
167 
168                        <div class="pub-button-container"> 
169                            <#assign btn_url = ""> 
170 
171                            <#if publication_button_label.publication_button_link?? && 
172                            publication_button_label.publication_button_link.getData()?has_content> 
173                                <#assign btn_url = publication_button_label.publication_button_link.getData()> 
174                            </#if> 
175 
176                            <#if !btn_url?has_content && publication_button_label.publication_button_file?? && 
177                            publication_button_label.publication_button_file.getData()?has_content> 
178                                <#assign btn_url = publication_button_label.publication_button_file.getData()> 
179                            </#if> 
180 
181                            <#if btn_url?has_content> 
182                                <#if publication_button_label?? && publication_button_label.getData()?has_content> 
183                                    <button type="button" onclick="window.open('${btn_url}','_blank')"> 
184                                        ${publication_button_label.getData()} 
185                                    </button> 
186                                <#else> 
187                                    <button type="button" 
188                                            onclick="window.open('${btn_url}','_blank')"><@liferay.language key="download" /></button> 
189                                </#if> 
190                            <#elseif themeDisplay.getPermissionChecker().isGroupAdmin(themeDisplay.getScopeGroupId())> 
191                                <div class="alert alert-warning m-3"> 
192                                    File reference is missing in the article 
193                                </div> 
194                            </#if> 
195                        </div> 
196                    </div> 
197                </div> 
198            </div> 
199            <div class="col-12"> 
200                <div class="main-content"> 
201                    <#if main_content?? && main_content.main_content_extended?has_content> 
202                        ${main_content.main_content_extended.getData()} 
203                    </#if> 
204                </div> 
205            </div> 
206        </div> 
207    </div> 
208 
209    <#if (publication_related_label.getSiblings()?size > 0) && 
210    ((publication_related_label.getSiblings()[0].publication_related_file?? && 
211    publication_related_label.getSiblings()[0].publication_related_file.getData()?has_content) || 
212    (publication_related_label.getSiblings()[0].publication_related_link?? && 
213    publication_related_label.getSiblings()[0].publication_related_link.getData()?has_content))> 
214        <div class="related-docs"> 
215            <div class="row-fluid"> 
216                <div class="col-10 offset-1"> 
217 
218                    <div class="related-section-title"> 
219                        <h2><@liferay.language key="related-documents" /></h2> 
220                    </div> 
221 
222                    <div class="row-fluid"> 
223                        <#list publication_related_label.getSiblings() as cur_publication_related_label> 
224                            <div class="related-result-row"> 
225                                <div class="projects-column article"> 
226                                    <div class="row-fluid related-row"> 
227                                        <div class="related-row-img"></div> 
228                                        <div class="related-row-content-wrapper"> 
229                                            <h3 class="related-row-title"> 
230                                                <#assign related_url = ""> 
231 
232                                                <#if cur_publication_related_label.publication_related_file?has_content> 
233                                                    <#assign related_url = cur_publication_related_label.publication_related_file.getData()> 
234                                                </#if> 
235 
236                                                <#if related_url == "" && cur_publication_related_label.publication_related_link?has_content> 
237                                                    <#assign related_url = cur_publication_related_label.publication_related_link.getData()> 
238                                                </#if> 
239                                                <a href="${related_url}" 
240                                                   target="blank">${cur_publication_related_label.getData()}</a> 
241                                            </h3> 
242                                        </div> 
243                                    </div> 
244                                </div> 
245                            </div> 
246                        </#list> 
247                    </div> 
248                </div> 
249            </div> 
250        </div> 
251    </#if> 
252</div>