GLOBE Projects

GLOBE Side Navigation

An error occurred while processing the template.
The following has evaluated to null or missing:
==> language.getChild("other_string")  [in template "10132#10165#GLOBE-PROJECT-TEMPLATE" at line 184, column 42]

----
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 otherLanguage = language.getC...  [in template "10132#10165#GLOBE-PROJECT-TEMPLATE" at line 184, column 17]
----
1<#assign 
2    orgArray = [] 
3    countryArray = [] 
4    userArray = [] 
5    badgeArray = [] 
6    languageArray = [] 
7    protocolArray = [] 
8    reportTypesArray = [] 
9    orgLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.OrganizationLocalService") 
10    userLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.UserLocalService") 
11    groupLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService") 
12    userGroupLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.UserGroupLocalService") 
13    idLocalService = serviceLocator.findService("gov.globe.util.idlookup.service.IDLookupLocalService") 
14    assetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") 
15    globeMemberId = idLocalService.getId("globe.usergroupid.globe_members") 
16    candidateId = idLocalService.getId("globe.usergroupid.candidates") 
17    studentsId = idLocalService.getId("globe.usergroupid.students") 
18    projectDate = getterUtil.getString(project_date.getData()) 
19    reportType = "" 
20    accountType = "" 
21    videoLink = "" 
22    presentationLink = "" 
23/> 
24 
25<#if (project_authororganization.getSiblings()?has_content)> 
26    <#list project_authororganization.getSiblings() as authOrg > 
27        <#assign 
28            accountTypeArr = stringUtil.split(authOrg.getData(), "@@@") 
29            dataArray = stringUtil.split(accountTypeArr[0], "$$$") 
30        /> 
31        <#if (accountTypeArr?size > 1)> 
32            <#assign 
33                accountType = accountTypeArr[1] 
34            /> 
35        <#else> 
36            <#assign 
37                accountType = "regular" 
38            /> 
39        </#if> 
40         
41        <#if (dataArray?has_content && dataArray?size > 0) > 
42            <#assign orgValue = dataArray[0] /> 
43            <#if (orgValue?is_string && !orgValue?eval?is_number)> 
44                <#assign org = orgLocalService.getOrganization(company.getCompanyId(), orgValue) /> 
45            <#else> 
46                <#assign org = orgLocalService.getOrganization(orgValue?eval) /> 
47            </#if> 
48            <#assign 
49                orgName = org.getName() 
50                group = org.getGroup() 
51                orgURL = group.getFriendlyURL() 
52                orgLink = "<a href='/web${orgURL}'>${orgName}</a>" 
53                orgArray = orgArray + [orgLink] 
54            /> 
55            <#attempt > 
56                <#list orgLocalService.getParentOrganizations(org.getOrganizationId()) as parentOrg > 
57                    <#if parentOrg.getType() == "country_organization" > 
58                        <#assign 
59                            countryLink = "<a href='/web${parentOrg.getGroup().getFriendlyURL()}'>${parentOrg.getName()}</a>" 
60                            countryArray = countryArray + [countryLink] 
61                        /> 
62                        <#break > 
63                    </#if> 
64                </#list> 
65            <#recover > 
66            </#attempt> 
67            <#if (dataArray?size > 1) > 
68                <#assign 
69                    userData = dataArray[1] 
70                /> 
71                 
72                <#-- check if name has an email --> 
73                <#if (userData?contains("("))> 
74                    <#attempt > 
75                        <#assign 
76                            emailAddress = stringUtil.extractLast(userData, "(") 
77                            emailAddress = stringUtil.extractFirst(emailAddress, ")") 
78                            user = userLocalService.getUserByEmailAddress(company.getCompanyId(), emailAddress) 
79                        /> 
80                        <#if user.isActive() > 
81                            <#if (userGroupLocalService.hasUserUserGroup(user.getUserId(), globeMemberId) 
82                                    || userGroupLocalService.hasUserUserGroup(user.getUserId(), candidateId) 
83                                    || userGroupLocalService.hasUserUserGroup(user.getUserId(), studentsId)) > 
84                                <#assign 
85                                    groupUser = groupLocalService.getGroup(user.getGroup().getGroupId()) 
86                                    userLink = "<a href='/web${groupUser.getFriendlyURL()}'>${user.getFullName()}</a>" 
87                                /> 
88                            <#else> 
89                                <#assign 
90                                    userLink = "${user.getFullName()}" 
91                                /> 
92                            </#if> 
93                        <#else> 
94                            <#assign 
95                                userLink = "${user.getFullName()} (inactive)" 
96                            /> 
97                        </#if> 
98                        <#assign 
99                            userArray = userArray + [userLink] 
100                        /> 
101                         
102                    <#recover > 
103                        <#-- no user found - just show name --> 
104                        <#assign 
105                            userData2 = stringUtil.extractFirst(userData, "(") 
106                        /> 
107                        <#assign 
108                            userArray = userArray + [userData2?trim] 
109                        /> 
110                    </#attempt> 
111 
112                <#else> 
113                    <#-- no email - just show name --> 
114                    <#assign 
115                        userArray = userArray + [userData] 
116                    /> 
117                </#if> 
118                 
119            </#if> 
120        </#if> 
121    </#list> 
122</#if> 
123<#if (project_badges?has_content && project_badges.getChildren()?has_content)> 
124    <#list project_badges.getChildren() as badge > 
125        <#if (badge.getData()?has_content && badge.getData()?eval) > 
126            <#assign badgeArray = badgeArray + [languageUtil.get(locale, badge.getName())] /> 
127        </#if> 
128    </#list> 
129</#if> 
130<#if (project_report_type_2?has_content) > 
131    <#-- this is the NEW way of specifying report types --> 
132    <#list project_report_type_2.getChildren() as reportTypeObj > 
133        <#if (reportTypeObj.getData()?has_content && (reportTypeObj.getName() == "ivss_report" || reportTypeObj.getName() == "mission_earth_report")) > 
134            <#assign reportType = reportTypeObj.getName() /> 
135        </#if> 
136        <#if (reportTypeObj.getData()?has_content && reportTypeObj.getData()?eval) > 
137            <#switch reportTypeObj.getName() > 
138                <#case "ivss_report"> 
139                    <#assign reportTypesArray = reportTypesArray + ["International Virtual Science Symposium Report"] /> 
140                <#break > 
141                <#case "standard_research_report"> 
142                    <#assign reportTypesArray = reportTypesArray + ["Standard Research Report"] /> 
143                <#break > 
144                <#case "mission_earth_report"> 
145                    <#assign reportTypesArray = reportTypesArray + ["Mission Earth Report"] /> 
146                <#break > 
147                <#case "mission_mosquito_report"> 
148                    <#assign reportTypesArray = reportTypesArray + ["Mission Mosquito Report"] /> 
149                <#break > 
150                <#case "student_research_symposia_report"> 
151                    <#assign reportTypesArray = reportTypesArray + ["U.S. Student Research Symposia (SRS)"] /> 
152                <#break > 
153            </#switch> 
154        </#if> 
155    </#list> 
156<#elseif (type_student_report?has_content) > 
157    <#-- this is the OLD way of specifying the report type --> 
158    <#assign 
159        project_report_type = type_student_report.getChild("project_report_type") 
160    /> 
161    <#if (project_report_type.getData() == "science_fair_report") > 
162        <#assign  
163            reportType = "ivss_report" 
164            reportTypesArray = reportTypesArray + ["International Virtual Science Symposium Report"] 
165        /> 
166    <#elseif (project_report_type.getData() == "standard_report") > 
167        <#assign 
168            reportType = "standard_research_report" 
169            reportTypesArray = reportTypesArray + ["Standard Research Report"] 
170        /> 
171    <#elseif (project_report_type.getData() == "mission_earth_report") > 
172        <#assign 
173            reportType = "mission_earth_report" 
174            reportTypesArray = reportTypesArray + ["Mission Earth Report"] 
175        /> 
176    </#if> 
177</#if> 
178 
179<#if report_language?has_content > 
180    <#list report_language.getChildren() as language> 
181        <#if (language.getData()?has_content && language.getData()?eval) > 
182            <#if (language.getName() == "other") > 
183                <#assign otherLanguage = language.getChild("other_string") /> 
184                <#if (otherLanguage.getData()?has_content) > 
185                    <#assign languageArray = languageArray +  
186                        [stringUtil.upperCaseFirstLetter(language.getName()) +  
187                            " (" + otherLanguage.getData() + ")"] /> 
188                </#if> 
189            <#else> 
190                <#assign languageArray = languageArray + [stringUtil.upperCaseFirstLetter(language.getName())] /> 
191            </#if> 
192        </#if> 
193    </#list> 
194</#if> 
195<#if protocol_checkboxes?has_content && protocol_checkboxes.getData()?has_content > 
196    <#assign protocolIds = stringUtil.split(protocol_checkboxes.getData()) /> 
197    <#list protocolIds as protocolId > 
198        <#if (protocolId?has_content) > 
199            <#assign 
200                category = assetCategoryLocalService.getCategory(protocolId?eval) 
201                protocolArray = protocolArray + [category.getName()] 
202            /> 
203        </#if> 
204    </#list> 
205</#if> 
206 
207<#if (proejct_video_url??) > 
208    <#if (proejct_video_url.getData()?has_content) > 
209        <#assign videoLink = proejct_video_url.getData() /> 
210    </#if> 
211</#if> 
212 
213<#if (project_poster_presentation??) > 
214    <#if (project_poster_presentation.getData()?has_content) > 
215        <#assign presentationLink = project_poster_presentation.getData() /> 
216    </#if> 
217</#if> 
218 
219<#if (project_presentation?has_content) > 
220    <#if project_presentation.getChild("proejct_video_url")??> 
221        <#assign  
222            proejct_video_url = project_presentation.getChild("proejct_video_url") 
223            videoLink = proejct_video_url.getData() 
224        /> 
225    </#if> 
226    <#if project_presentation.getChild("project_poster_presentation")??> 
227        <#assign  
228            project_poster_presentation = project_presentation.getChild("project_poster_presentation") 
229            presentationLink = project_poster_presentation.getData() 
230        /> 
231    </#if> 
232</#if> 
233 
234<#assign 
235    organizations = stringUtil.merge(orgArray, ", ") 
236    countries = stringUtil.merge(countryArray, ", ") 
237    users = stringUtil.merge(userArray, ", ") 
238    badges = stringUtil.merge(badgeArray, ", ") 
239    languages = stringUtil.merge(languageArray, ", ") 
240    reportTypes = stringUtil.merge(reportTypesArray, ", ") 
241    protocols = stringUtil.merge(protocolArray, ", ") 
242    projectImageUrl = project_thumbnail_image.getData() 
243/> 
244<#if (validator.isNull(projectImageUrl)) > 
245    <#assign 
246        projectImageUrl = "/o/gov-globe-main-theme/images/GLOBE_news_and_events_thumbnail.jpg" 
247    /> 
248</#if> 
249 
250<style type="text/css" > 
251    #report-container #report-details-container { 
252        display: flex; 
253
254    #report-container #report-details-container #report-details { 
255        flex: 1; 
256
257    #report-container #report-details-container .report-data-row { 
258        padding-bottom: 7px; 
259
260    #report-container #report-details-container .report-data-row .report-data-title { 
261        font-weight: 700; 
262
263    #report-container #report-details-container .report-data-row .report-data-value { 
264        padding:0px 10px; 
265
266    #report-container #report-image img { 
267        width: 100%; 
268        height: auto; 
269
270    #report-container #report-url-description { 
271        margin: 20px 0 0; 
272
273    #report-container #report-url-description #report-description { 
274        margin-top: 20px; 
275
276</style> 
277 
278<div id="report-container"> 
279    <h2 style="padding-bottom:10px;">${project_title.getData()}</h2> 
280    <div id="report-details-container" class="row"> 
281        <div id="report-details" class="col-12 col-sm order-2 order-sm-0"> 
282            <div class="report-data-row" ><span class="report-data-title" >Organization(s):</span><span class="report-data-value" >${organizations}</span></div> 
283            <div class="report-data-row" ><span class="report-data-title" >Country:</span><span class="report-data-value" >${countries}</span></div> 
284            <div class="report-data-row" ><span class="report-data-title" >Student(s):</span><span class="report-data-value" >${project_authors.getData()}</span></div> 
285            <div class="report-data-row" ><span class="report-data-title" >Grade Level:</span><span class="report-data-value" >${languageUtil.get(locale,project_grade.getData())}</span></div> 
286             
287            <div class="report-data-row" ><span class="report-data-title" > 
288            <#if (accountType == 'obs_cs' || accountType == 'obs_school')> 
289                Teacher:</span><span class="report-data-value">${users}</span></div> 
290            <#else> 
291                GLOBE Teacher:</span><span class="report-data-value">${users}</span></div> 
292            </#if> 
293             
294            <div class="report-data-row" ><span class="report-data-title" >Contributors:</span><span class="report-data-value" >${project_additional_authors.getData()}</span></div> 
295            <div class="report-data-row" ><span class="report-data-title" >Report Type(s):</span><span class="report-data-value" >${reportTypes}</span></div> 
296            <div class="report-data-row" ><span class="report-data-title" >Protocols:</span><span class="report-data-value" >${protocols}</span></div> 
297 
298            <#if (reportType == "ivss_report" || reportType == "mission_earth_report") > 
299                <#if (videoLink?has_content && videoLink?length > 0) > 
300                    <#if (!stringUtil.startsWith(videoLink, "http://") && !stringUtil.startsWith(videoLink, "https://")) > 
301                        <#assign videoLink = "http://" + videoLink /> 
302                    </#if> 
303                    <div class="report-data-row"> 
304                        <span class="report-data-title">Presentation Video:</span><span  
305                                class="report-data-value" > 
306                            <a href="${videoLink}" target="_blank">View Video</a> 
307                        </span> 
308                    </div> 
309                </#if> 
310 
311                <#if (presentationLink?has_content && presentationLink?length > 0) > 
312                    <div class="report-data-row"> 
313                        <span class="report-data-title">Presentation Poster:</span><span  
314                                class="report-data-value"> 
315                            <a href="${presentationLink}" target="_blank">View Document</a> 
316                        </span> 
317                    </div> 
318                </#if> 
319            </#if> 
320            <#if (reportType == "ivss_report") > 
321                <div class="report-data-row"> 
322                    <span class="report-data-title">Optional Badges:</span><span  
323                            class="report-data-value" >${badges}</span> 
324                </div> 
325            </#if> 
326            <div class="report-data-row" > 
327                <span class="report-data-title" >Language(s):</span><span  
328                        class="report-data-value" >${languages}</span> 
329            </div> 
330            <div class="report-data-row" > 
331                <span class="report-data-title" >Date Submitted:</span><span  
332                        class="report-data-value" >${projectDate}</span> 
333            </div> 
334        </div> 
335        <div id="report-image" class="col-12 col-sm-5 col-md-4 order-1 text-center pb-4"> 
336            <img src="${projectImageUrl}" alt="${project_thumbnail_alt_tag.getData()}" onerror="this.src='/o/gov-globe-main-theme/images/GLOBE_news_and_events_thumbnail.jpg'"> 
337        </div> 
338    </div> 
339    <div id="report-url-description"> 
340        <#if (project_linkto_document.getData() != "")> 
341            <div > 
342                <a href="${project_linkto_document.getData()}" target="_blank"><b>View Research Report</b></a><br> 
343            </div> 
344        </#if> 
345        <div id="report-description"> 
346            ${project_description.getData()} 
347        </div> 
348    </div> 
349</div> 



Comments