Issue 16096

UAT: Species distributions freemarker error

16096
Reporter: trobertson
Assignee: mdoering
Type: Bug
Summary: UAT: Species distributions freemarker error
Priority: Major
Resolution: Fixed
Status: Resolved
Created: 2014-07-10 10:56:13.339
Updated: 2014-07-10 14:21:09.251
Resolved: 2014-07-10 14:21:09.216
        
Description: ERROR [2014-07-10 10:55:21,014+0200] [http-bio-8080-exec-228] com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor: The following has evaluated to null or missing:
==> u  [in template "WEB-INF/pages/species/distributions.ftl" at line 62, column 24]

Tip: If the failing expression is known to be legally null/missing, either specify a default value with myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthessis: (myOptionVar.foo)!myDefault, (myOptionVar.foo)??

The failing instruction (print stack trace for 2 more):
==> #if u.source?has_content  [in template "WEB-INF/pages/species/distributions.ftl" at line 62, column 19]
freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:
==> u  [in template "WEB-INF/pages/species/distributions.ftl" at line 62, column 24]

Tip: If the failing expression is known to be legally null/missing, either specify a default value with myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthessis: (myOptionVar.foo)!myDefault, (myOptionVar.foo)??

The failing instruction (print stack trace for 2 more):
==> #if u.source?has_content  [in template "WEB-INF/pages/species/distributions.ftl" at line 62, column 19]
]]>
    


Author: trobertson@gbif.org
Created: 2014-07-10 11:45:27.309
Updated: 2014-07-10 11:45:27.309
        
vernaculars.ftl also has a ".usageKey" in there, and I suspect this should read ".sourceTaxonKey".
Please check vernaculars.ftl as well
    


Author: mdoering@gbif.org
Comment: https://github.com/gbif/portal-web/commit/4f5576e4360346f4d95ea593c4166e04dc4c1adf#diff-ee823ce530052828a9443c613979d5fdR62
Created: 2014-07-10 14:21:09.248
Updated: 2014-07-10 14:21:09.248