Startseite mit Links

حصل خطأ عند معالجة القالب.
The following has evaluated to null or missing:
==> formField.getValue().getString(locale)  [in template "20097#20125#STARTSEITE" at line 136, column 49]

----
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 Bildnachweis = formField.getV...  [in template "20097#20125#STARTSEITE" in function "getCopyright" at line 136, column 25]
	- Reached through: ${getCopyright(Hintergrundbild)}  [in template "20097#20125#STARTSEITE" at line 65, column 51]
----
1<#assign layoutService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService") /> 
2<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
3<div class="startseite" <#if Hintergrundbild.getData()?? && Hintergrundbild.getData() != ""> 
4            style="background-image: url('${Hintergrundbild.getData()}');" 
5</#if> 
6
7        <img class="bg-image" alt="${getAltText(Hintergrundbild)}" 
8             data-fileentryid="${Hintergrundbild.getAttribute("fileEntryId")}" src="${Hintergrundbild.getData()}"/> 
9 
10    <h1 class="main-title"> ${Titel.getData()}</h1> 
11 
12    <div class="circle-links"> 
13 
14    <a class="circle-link green-link" href="${LinkGreen.getFriendlyUrl()}"> 
15        <div class="circle green-circle"> 
16            <#if LinkGreen.TextGreen.siblings?has_content> 
17                <#list LinkGreen.TextGreen.siblings as cur_Text> 
18                    <span class="text"> ${cur_Text.getData()}</span> 
19                </#list> 
20            </#if> 
21        </div> 
22    </a> 
23 
24    <a class="circle-link orange-link" href="${LinkOrange.getFriendlyUrl()}"> 
25        <div class="circle orange-circle"> 
26            <#if LinkOrange.TextOrange.siblings?has_content> 
27                <#list LinkOrange.TextOrange.siblings as cur_Text> 
28                    <span class="text"> ${cur_Text.getData()}</span> 
29                </#list> 
30            </#if> 
31        </div> 
32    </a> 
33 
34    <a class="circle-link magenta-link" href="${LinkMagenta.getFriendlyUrl()}"> 
35        <div class="circle magenta-circle"> 
36            <#if LinkMagenta.TextMagenta.siblings?has_content> 
37                <#list LinkMagenta.TextMagenta.siblings as cur_Text> 
38                    <span class="text"> ${cur_Text.getData()}</span> 
39                </#list> 
40            </#if> 
41        </div> 
42    </a> 
43 
44    <a class="circle-link cyan-link" href="${LinkCyan.getFriendlyUrl()}"> 
45        <div class="circle cyan-circle"> 
46            <#if LinkCyan.TextCyan.siblings?has_content> 
47            <#list LinkCyan.TextCyan.siblings as cur_Text> 
48            <span class="text"> ${cur_Text.getData()}</span> 
49            </#list> 
50            </#if> 
51        </div> 
52    </a> 
53     </div> 
54 
55    <div class="footer" role="contentinfo"> 
56        <div> 
57            <div class="row-fluid container-inner copyrightbar"> 
58                <div class="copyright">&#169;2020&nbsp;&#45;&nbsp;Landesanstalt für Umwelt Baden-Württemberg</div> 
59                <div class="legal"> 
60                    <a target="_blank" href="https://www.lubw.baden-wuerttemberg.de/impressum">Impressum</a> | <a target="_blank"href="https://www.lubw.baden-wuerttemberg.de/datenschutz/allgemeine-datenschutzerklaerung">Datenschutz</a> 
61                </div> 
62        </div> 
63        </div> 
64    </div> 
65    <div class="bildnachweis">Bildnachweis: &#169;${getCopyright(Hintergrundbild)}</div> 
66</div> 
67 
68<#function getAltText ddmImage> 
69    <#assign 
70    altText = ddmImage.getAttribute("alt") 
71    /> 
72    <#if altText?has_content> 
73        <#return altText /> 
74    <#else> 
75        <#assign 
76        imageUrl = ddmImage.getData() 
77        imageFileUid = stringUtil.extractLast(imageUrl, "/") 
78        /> 
79        <#if (stringUtil.extractFirst(imageFileUid, "t")??)> 
80            <#assign imageFileUid = stringUtil.extractFirst(imageFileUid, "t")/> 
81            <#assign imageFileUid = imageFileUid?substring(0,imageFileUid?length-1)/> 
82        </#if> 
83        <#assign 
84        dlFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") 
85        fileEntry = dlFileEntryLocalService.getFileEntryByUuidAndGroupId(imageFileUid, groupId) 
86        fileEntryTypeId = fileEntry.getFileEntryTypeId() 
87        /> 
88        <#if fileEntryTypeId gt 0> 
89            <#assign 
90            dlFileEntryTypeLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryTypeLocalService") 
91            dlFileVersionLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileVersionLocalService") 
92            dlFileVersion = dlFileVersionLocalService.getLatestFileVersion(fileEntry.getUserId(), fileEntry.getFileEntryId()) 
93            fieldsMap = fileEntry.getDDMFormValuesMap(dlFileVersion.getFileVersionId()) 
94            /> 
95            <#list fieldsMap?keys as ddmFormKey> 
96                <#assign ddmForm = fieldsMap[ddmFormKey]/> 
97                <#list ddmForm.getDDMFormFieldValues() as formField> 
98                    <#if formField.getName() == 'alttag'> 
99                        <#assign altTag = formField.getValue().getString(locale) /> 
100                        <#return altTag /> 
101                    </#if> 
102                </#list> 
103            </#list> 
104        </#if> 
105    </#if> 
106    <#return altText /> 
107</#function> 
108 
109 
110<#function getCopyright ddmImage> 
111    <#assign 
112        Bildnachweis = "" 
113        imageUrl = ddmImage.getData() 
114        imageFileUid = stringUtil.extractLast(imageUrl, "/") 
115        /> 
116        <#if (stringUtil.extractFirst(imageFileUid, "t")??)> 
117            <#assign imageFileUid = stringUtil.extractFirst(imageFileUid, "t")/> 
118            <#assign imageFileUid = imageFileUid?substring(0,imageFileUid?length-1)/> 
119        </#if> 
120        <#assign 
121        dlFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") 
122        fileEntry = dlFileEntryLocalService.getFileEntryByUuidAndGroupId(imageFileUid, groupId) 
123        fileEntryTypeId = fileEntry.getFileEntryTypeId() 
124        /> 
125        <#if fileEntryTypeId gt 0> 
126            <#assign 
127            dlFileEntryTypeLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryTypeLocalService") 
128            dlFileVersionLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileVersionLocalService") 
129            dlFileVersion = dlFileVersionLocalService.getLatestFileVersion(fileEntry.getUserId(), fileEntry.getFileEntryId()) 
130            fieldsMap = fileEntry.getDDMFormValuesMap(dlFileVersion.getFileVersionId()) 
131            /> 
132            <#list fieldsMap?keys as ddmFormKey> 
133                <#assign ddmForm = fieldsMap[ddmFormKey]/> 
134                <#list ddmForm.getDDMFormFieldValues() as formField> 
135                    <#if formField.getName() == 'copyright'> 
136                        <#assign Bildnachweis = formField.getValue().getString(locale) /> 
137                        <#return Bildnachweis /> 
138                    </#if> 
139                </#list> 
140            </#list> 
141        </#if> 
142    <#return Bildnachweis/> 
143</#function>