Došlo je do pogreške prilikom obrade predloška.
The following has evaluated to null or missing:
==> entry['origin']  [in template "20155#20195#120498" at line 50, column 32]

----
Tip: It's the final [] step that caused this error, not those before it.
----
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: #assign originEntry = entry["origin"]  [in template "20155#20195#120498" at line 50, column 9]
----
1<#-- TEMPLATE KEY : 244077 --> 
2<#-- TEMPLATE NAME: HNB Regulativa detalj.ftl --> 
3 
4<#-- Fileter Functions ADT --> 
5<#include "${templatesPath}/4812567" /> 
6 
7<#assign dLFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")> 
8<#assign dLFileEntryTypeLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryTypeLocalService")> 
9<#assign dLAppLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppLocalService")> 
10 
11<#assign ddmStructureLocalService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMStructureLocalService")> 
12<#assign journalConverter = serviceLocator.findService("com.liferay.journal.util.JournalConverter")> 
13<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.link.service.AssetLinkLocalService" )> 
14<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService" )> 
15 
16<style> 
17    .table-container table, 
18    .table-container table th, 
19    .table-container table td { border:none; background-color: #fff; padding: 6px; } 
20    .table-container table th { text-transform: uppercase; text-align:right; } 
21    .table-container table {width:auto;} 
22    ul {list-style: none;} 
23</style> 
24 
25<#assign dLFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")> 
26<#assign dLFileEntryTypeLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryTypeLocalService")> 
27<#assign dLAppLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppLocalService")> 
28 
29<#assign ddmStructureLocalService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMStructureLocalService")> 
30<#assign journalConverter = serviceLocator.findService("com.liferay.journal.util.JournalConverter")> 
31<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.link.service.AssetLinkLocalService" )> 
32<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService" )> 
33 
34<style> 
35    .table-container table, 
36    .table-container table th, 
37    .table-container table td { border:none; background-color: #fff; padding: 6px; } 
38    .table-container table th { text-transform: uppercase; text-align:right; } 
39    .table-container table {width:auto;} 
40    ul {list-style: none;} 
41</style> 
42 
43<#if entries?has_content> 
44    <#list entries as curEntry> 
45			<#if !entry??> 
46				<br/> Ne postoji odluka - provjerite s urednikom. 
47				<#continue /> 
48			</#if> 
49 
50        <#assign originEntry = entry['origin'] > 
51        <#assign baseEntry = entry['base'] > 
52        <#assign historyList = entry['history']! > 
53        <#assign dodatakOdluka = entry['dodatak_odluka']! > 
54        <#assign dodatakUputa = entry['dodatak_uputa']! > 
55 
56    <#-- HANDLE LOCALE --> 
57        <#if !baseEntry.getAvailableLanguageIds()?seq_contains(locale) > 
58            <div class="no-translation">${languageUtil.get(locale,"templates.locale.contentNotAvailable")}</div> 
59 
60        <#else> 
61            <#assign naslov = baseEntry.getTitle(locale)/> 
62 
63            <#assign baseFields = getFields(baseEntry) /> 
64            <#assign baseArticle = getArticle(baseEntry) /> 
65 
66            <#if baseFields.get("najava_naslov")?has_content && baseFields.get("najava_naslov").getValue(locale)?has_content > 
67                <#assign naslov = baseFields.get("najava_naslov").getValue(locale) /> 
68            </#if> 
69 
70        <#-- ARTICLE --> 
71            <div class="article"> 
72                <h2 class="article-title">${naslov}</h2> 
73                <div class="article-action-icons"> 
74                    <div class="col-4-5" style="text-align:left;"> 
75                        <#if baseFields.get("datum_objave")?has_content && baseFields.get("datum_objave").getValue(locale)?has_content> 
76                            <span class="displayDate">${languageUtil.get(locale,"templates.article.publishDate")}: ${formatDate(baseFields.get("datum_objave").getValue(locale)?date("yyyy-MM-dd"))} </span> 
77                        </#if> 
78                        <#if baseFields.get("datum_azuriranja")?has_content && baseFields.get("datum_azuriranja").getValue(locale)?has_content> 
79                            <span class="separator"></span> 
80                            <span class="modifiedDate">${languageUtil.get(locale,"templates.article.modifiedDate")}: ${formatDate(baseFields.get("datum_azuriranja").getValue(locale)?date("yyyy-MM-dd"))} </span> 
81                        </#if> 
82                    </div> 
83                    <div class="col-1-5" style="text-align:right;"> 
84                        <#if exportUrl?has_content> 
85                            <a href='${exportUrl?replace("targetExtension=", "targetExtension=doc")}' target="_self"><i class="fa fa-file-word-o"></i></a> 
86                            <a href='${exportUrl?replace("targetExtension=", "targetExtension=pdf")}' target="_self"><i class="fa fa-file-pdf-o"></i></a> 
87                            <a href='${exportUrl?replace("targetExtension=", "targetExtension=txt")}' target="_self"><i class="fa fa-file-text-o"></i></a> 
88                        </#if> 
89                        <#if pagePrintUrl?has_content> 
90                            <a href="javascript:printPage('${pagePrintUrl}')"><i class="fa fa-print"></i></a> 
91                        <#elseif namespace?has_content> 
92                            <a href="javascript:${namespace}printPage()"><i class="fa fa-print"></i></a> 
93                        </#if> 
94                    </div> 
95                    <div class="clear"></div> 
96                </div> 
97 
98                <div class="article-content"> 
99 
100                    <div class="metadata-container margo-b-16"> 
101 
102                        <#-- ATRIBUTI --> 
103                        <@drawTable baseFields/> 
104 
105                        <#-- POVIJEST --> 
106                        <@drawHistory historyList true/> 
107 
108                        <#-- DODATAK UPUTA --> 
109                        <@drawHistory dodatakUputa false/> 
110 
111                        <#-- DODATAK ODLUKA --> 
112                        <@drawHistory dodatakOdluka false/> 
113 
114                    </div> 
115                </div> 
116                <#-- YourEurope stuff --> 
117                <#assign originFields = getFields(originEntry) /> 
118 
119 
120                <#if (originFields.get('youreurope').getValue(locale))!null?? > 
121                    <#assign prikaziYoureEuropeForm = originFields.get('youreurope').getValue()?string('da','ne') /> 
122                <#else> 
123                    <#assign prikaziYoureEuropeForm = "ne" /> 
124                </#if> 
125 
126                <#-- assign prikaziYoureEuropeForm = originFields.get('youreurope').getValue()?string('da','ne') /--> 
127 
128                <#-- ovo daje ispravno rješenje 
129                ${originFields.get('youreurope').getValue()?c} 
130                --> 
131 
132                <#if prikaziYoureEuropeForm == "da" > 
133                    <#include "${templatesPath}/3692422" /> 
134                </#if> 
135            </div> 
136        </#if> 
137        <#break> 
138    </#list> 
139</#if> 
140 
141<#macro drawTable fields> 
142    <div class="table-container"> 
143        <table> 
144            <tbody> 
145            <#-- 
146            <#if fields.get("podvrsta").getRenderedValue(locale)?has_content> 
147                <tr> 
148                    <th>PODVRSTA</th> 
149                    <td>${fields.get("podvrsta").getRenderedValue(locale)}</td> 
150                </tr> 
151            </#if> 
152            --> 
153            <#if fields.get("donositelj").getRenderedValue(locale)?has_content> 
154                <tr> 
155                    <th>${languageUtil.get(locale,"templates.regulations.table.donositelj")}</th> 
156                    <td>${fields.get("donositelj").getRenderedValue(locale)}</td> 
157                </tr> 
158            </#if> 
159            <#if fields.get("podrucje").getRenderedValue(locale)?has_content> 
160                <tr> 
161                    <th>${languageUtil.get(locale,"templates.regulations.table.podrucje")}</th> 
162                    <td>${fields.get("podrucje").getRenderedValue(locale)}</td> 
163                </tr> 
164            </#if> 
165            <#if fields.get("vrsta").getRenderedValue(locale)?has_content> 
166                <tr> 
167                    <th>${languageUtil.get(locale,"templates.regulations.table.vrsta")}</th> 
168                    <td>${fields.get("vrsta").getRenderedValue(locale)}</td> 
169                </tr> 
170            </#if> 
171            </tbody> 
172        </table> 
173 
174        <#if fields.get("nesluzbeni_procisceni_tekst")?has_content && (fields.get("nesluzbeni_procisceni_tekst").getValue(locale)?has_content)> 
175 
176            <p> 
177                <#local nesluzbeniProcisceniTextJSONString = fields.get("nesluzbeni_procisceni_tekst").getValue(locale)> 
178 
179                <#if nesluzbeniProcisceniTextJSONString?is_sequence> 
180                    <#if isAdmin> 
181                        <br />Regulativa detalji: nesluzbeni_procisceni_tekst SIZE: ${nesluzbeniProcisceniTextJSONString?size?c} 
182                        <#list nesluzbeniProcisceniTextJSONString as nesluzbeniProcisceniText> 
183                            <br />Regulativa detalji: nesluzbeni_procisceni_tekst VALUE[${nesluzbeniProcisceniText?index}]: ${nesluzbeniProcisceniText} 
184                        </#list> 
185                    </#if> 
186 
187                    <#local nesluzbeniProcisceniTextJSONString = nesluzbeniProcisceniTextJSONString[0] /> 
188                </#if> 
189 
190                <#if isAdmin> 
191                    <br />Regulativa detalji: getFields result type: ${fields} 
192 
193                    <#if fields.get("nesluzbeni_procisceni_tekstFieldSet")?has_content> 
194                        <br />Regulativa detalji: nesluzbeni_procisceni_tekstFieldSet: ${fields.get("nesluzbeni_procisceni_tekstFieldSet")} 
195                    </#if> 
196 
197 
198                    <br />Regulativa detalji: nesluzbeni_procisceni_tekst: ${nesluzbeniProcisceniTextJSONString} 
199                </#if> 
200 
201                <#if nesluzbeniProcisceniTextJSONString?has_content> 
202                    <#local dlFileEntry = getDLFileEntry(nesluzbeniProcisceniTextJSONString)> 
203                    <#if dlFileEntry?has_content> 
204                        <#local fileEntryURL = resolveFileEntryURL(nesluzbeniProcisceniTextJSONString)> 
205                        <#if fileEntryURL?has_content> 
206                            <a href="${fileEntryURL}" target="_self" data_title="${dlFileEntry.getTitle()}">${dlFileEntry.getDescription()}</a> 
207                        </#if> 
208                    </#if> 
209                </#if> 
210                <#local nn_npt = fields.get("nn_npt").getRenderedValue(locale, 0)> 
211                <#if nn_npt?has_content> 
212                    <br>${nn_npt} 
213                </#if> 
214            </p> 
215        <#-- PRILOZI --> 
216            <@drawAttachmentsTechnical fields/> 
217 
218        </#if> 
219    </div> 
220</#macro> 
221 
222<#macro drawAttachments fields> 
223    <#if fields.get("prilog")?has_content && (fields.get("prilog").getValue(locale)?size >= 1)> 
224 
225        <ul class="margo-t-4 margo-b-8 pad-l-16"> 
226            <#list fields.get("prilog").getValue(locale) as row> 
227 
228                <#if row?has_content> 
229                    <#local fileEntry = getDLFileEntry(row)> 
230                    <#local fileEntryURL = resolveFileEntryURL(row)> 
231 
232                    <#if fileEntry?has_content> 
233                        <#assign fileType = getDLFileEntryType(fileEntry)/> 
234                        <#if fileType?starts_with("HNB Dokument - vrijeme")> 
235                            <#local fileModifiedDate = fileEntry.getCreateDate()/> 
236                            <#if fileEntry.getModifiedDate()?has_content > 
237                                <#local fileModifiedDate = fileEntry.getModifiedDate()/> 
238                            </#if> 
239                            <li> 
240                                <@fileEntryIcon fileEntry /> 
241                                <a href="${fileEntryURL}" target="_self" data_title="${fileEntry.getTitle()}">${fileEntry.getDescription()} - ${languageUtil.get(locale,"templates.article.modifiedDate")}: ${formatDateTime(fileModifiedDate)}</a> 
242                            </li> 
243                        <#else> 
244                            <li> 
245                                <@fileEntryIcon fileEntry /> 
246                                <a href="${fileEntryURL}" target="_self" data_title="${fileEntry.getTitle()}">${fileEntry.getDescription()}</a> 
247 
248                                <#if isAdmin> 
249                                    Regulativa detalji: prilog: fileType: ${fileType} 
250                                </#if> 
251                            </li> 
252                        </#if> 
253                    </#if> 
254                </#if> 
255            </#list> 
256        </ul> 
257    </#if> 
258</#macro> 
259 
260<#macro drawAttachmentsTechnical fields> 
261    <#if fields.get("prilog_tehnicki")?has_content && (fields.get("prilog_tehnicki").getValue(locale)?size >= 1)> 
262 
263        <ul class="margo-t-4 margo-b-8"> 
264            <#list fields.get("prilog_tehnicki").getValue(locale) as row> 
265                <#local tehnickiPrilog = row> 
266                <#if tehnickiPrilog?has_content> 
267                    <#local fileEntry = getDLFileEntry(tehnickiPrilog)> 
268                    <#if fileEntry?has_content> 
269                        <#local fileEntryURL = resolveFileEntryURL(tehnickiPrilog)> 
270                        <li> 
271                            <@fileEntryIcon fileEntry /> 
272                            <a href="${fileEntryURL}" target="_self" data_title="${fileEntry.getTitle()}">${fileEntry.getDescription()}</a> 
273                        </li> 
274                    </#if> 
275                </#if> 
276            </#list> 
277        </ul> 
278    </#if> 
279</#macro> 
280 
281<#macro drawHistory entries drawBase> 
282    <#if (( entries?has_content && entries?size > 0) || drawBase)> 
283        <div class="margo-t-4 margo-b-8 pad-t-8 pad-b-8 brd-t-grey"> 
284            <#list entries?reverse as entry> 
285                <#if entry.getTitle(locale, false)?has_content > 
286                    <@drawHistoryItem entry /> 
287                </#if> 
288            </#list> 
289            <#if baseEntry.getTitle(locale, false)?has_content && drawBase> 
290                <@drawHistoryItem baseEntry /> 
291            </#if> 
292        </div> 
293    </#if> 
294</#macro> 
295 
296<#macro drawHistoryItem historyItem> 
297    <#if !historyItem?has_content> 
298        <#return> 
299    </#if> 
300 
301    <#local fields = getFields(historyItem) /> 
302 
303    <#if (fields.get("dokument")?has_content && fields.get("dokument").getValue(locale)?has_content) 
304    || (fields.get("link")?has_content && fields.get("link").getRenderedValue(locale)?has_content) > 
305 
306        <#-- WRAPPER --> 
307        <#if historyItem.getEntryId() == originEntry.getEntryId()> 
308            <p style="font-weight:bold;"> 
309            <span><i class="fa fa-check-square" style="color:#c81818;"></i></span> 
310        <#else> 
311            <p> 
312        </#if> 
313 
314        <#-- CONTENT --> 
315 
316        <#if fields.get("najava_naslov")?has_content && fields.get("najava_naslov").getValue(locale)?has_content > 
317            <#assign naslov = fields.get("najava_naslov").getValue(locale) /> 
318        <#else> 
319            <#assign naslov = historyItem.getTitle(locale)/> 
320        </#if> 
321 
322        ${naslov} 
323 
324        <#if fields.get("nn").getRenderedValue(locale)?has_content  > 
325            <#if fields.get("nn").getRenderedValue(locale)?starts_with("[")> 
326                <#assign endIndex=fields.get("nn").getRenderedValue(locale)?last_index_of("]")> 
327                <#assign trimedValue= fields.get("nn").getRenderedValue(locale)[endIndex+1..]> 
328                <#if trimedValue?has_content  > 
329                    <br>${trimedValue} 
330                </#if> 
331            <#else> 
332                <br>${fields.get("nn").getRenderedValue(locale)} 
333            </#if> 
334        </#if> 
335 
336        <#if fields.get("dokument")?has_content && fields.get("dokument").getValue(locale)?has_content > 
337            <#local fileEntry = getDLFileEntry(fields.get("dokument").getValue(locale))> 
338 
339            <#if fileEntry?has_content> 
340                <#local fileEntryURL = resolveFileEntryURL(fields.get("dokument").getValue(locale))> 
341            </#if> 
342        </#if> 
343 
344        <#if fields.get("link").getRenderedValue(locale)?has_content> 
345            <br> 
346            <i class="fa fa-external-link"></i> 
347            <a href="${fields.get("link").getRenderedValue(locale)}" target="_self">Link</a> 
348        <#elseif fileEntryURL?has_content> 
349            <#assign fileType = getDLFileEntryType(fileEntry)/> 
350            <#local fileModifiedDate ="" /> 
351            <#-- ovo postoji u makrou drawAttachments - TODO: refactor --> 
352            <#if fileType?starts_with("HNB Dokument - vrijeme")> 
353                <#local fileModifiedDate = fileEntry.getCreateDate()/> 
354                <#if fileEntry.getModifiedDate()?has_content > 
355                    <#local fileModifiedDate = fileEntry.getModifiedDate()/> 
356                </#if> 
357                <#local fileModifiedDate = " - " + languageUtil.get(locale,"templates.article.modifiedDate")+": "+ formatDateTime(fileModifiedDate)/> 
358            </#if> 
359            <br> 
360            <@fileEntryIcon fileEntry /> 
361            <a href="${fileEntryURL}" target="_self" data_title="${fileEntry.getTitle()}">${languageUtil.get(locale,"templates.link.download")}</a> 
362            ${fileModifiedDate} 
363 
364            ${asDebug('Regulativa detalji: prilog: fileType: ${fileType}', 'history_item_')} 
365        </#if> 
366 
367        <#-- PRIKAZ NAPOMENE --> 
368        <#if fields.get("napomena")?has_content && fields.get("napomena").getRenderedValue(locale)?has_content> 
369            <br/> 
370            <p> 
371            <ul class="margo-t-4 margo-b-8"> 
372                <li><h4>${fields.get("napomena").getRenderedValue(locale)}</h4></li> 
373            </ul> 
374            </p> 
375        </#if> 
376 
377        <#-- ATTACHEMNTS --> 
378        <@drawAttachments fields /> 
379 
380        <#-- ENDCONTENT --> 
381        <#-- END WRAPPER --> 
382        </p> 
383    </#if> 
384</#macro> 
385 
386<#macro fileEntryIcon fileEntry> 
387    <#if fileEntry?has_content> 
388        <#local fileExt = fileEntry.getExtension() /> 
389        <#if fileExt == "pdf"> 
390            <i class="fa fa-file-pdf-o"></i> 
391        <#elseif fileExt == "doc" || fileExt == "docx"> 
392            <i class="fa fa-file-word-o"></i> 
393        <#elseif fileExt == "xls" || fileExt == "xlsx"> 
394            <i class="fa fa-file-excel-o"></i> 
395        <#elseif fileExt == "csv"> 
396            <i class="fa fa-file-text-o"></i> 
397        <#elseif fileExt == "ppt" || fileExt == "pptx"> 
398            <i class="fa fa-file-powerpoint-o"></i> 
399        <#elseif fileExt == "jpg" || fileExt == "jpeg" || fileExt == "png" || fileExt = "bmp" || fileExt = "gif"> 
400            <i class="fa fa-file-image-o"></i> 
401        <#elseif fileExt == "zip" || fileExt == "rar" || fileExt = "7z" || fileExt == "tar"> 
402            <i class="fa fa-file-archive-o"></i> 
403        <#else> 
404            <i class="fa fa-file-o"></i> 
405        </#if> 
406    </#if> 
407</#macro> 
408 
409<#function getArticle entry> 
410    <#local assetRenderer = entry.getAssetRenderer() /> 
411    <#local article = assetRenderer.getArticle() /> 
412    <#return article > 
413</#function> 
414<#-- review this function and check if it can be refactored. Put coment what is return result --> 
415<#function getFields entry> 
416    <#local assetRenderer = entry.getAssetRenderer() /> 
417    <#local article = assetRenderer.getArticle() /> 
418    <#local ddmStructure = article.getDDMStructure() /> 
419    <#local fields = journalConverter.getDDMFields(ddmStructure, article.getContent()) /> 
420    <#return fields > 
421</#function> 
422 
423<#function formatDate date> 
424    <#assign date_pattern = {"hr_HR":"d.M.yyyy.", "en_US":"d/M/yyyy"}> 
425 
426    <#assign formatteddate = dateUtil.getDate(date, date_pattern[locale], locale) > 
427 
428    <#return formatteddate> 
429</#function> 
430 
431<#function formatDateTime date> 
432    <#assign date_pattern = {"hr_HR":"d.M.yyyy.", "en_US":"d/M/yyyy"}> 
433    <#assign time_pattern = {"hr_HR":"HH:mm", "en_US":"HH:mm"}> 
434 
435    <#assign formatteddate = dateUtil.getDate(date, date_pattern[locale], locale) > 
436    <#assign formattedtime = dateUtil.getDate(date, time_pattern[locale], locale) > 
437    <#if locale == "en_US" > 
438        <#return formatteddate+" at "+ formattedtime> 
439    <#else> 
440        <#return formatteddate+" u "+ formattedtime> 
441    </#if> 
442</#function>