템플렛을 가공하고 있는 동안 과실은 일어났다.
The following has evaluated to null or missing: ==> Video_URL [in template "20302#20342#58753301" at line 31, column 22] ---- 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 yturl = Video_URL.getData()!"" [in template "20302#20342#58753301" at line 31, column 5] ----
1<#assign _dlfels = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") />
2
3<#-- A common display date snippet that retrieves the display date meta data field
4 of the web content, saves the original page locale for later, then sets the page
5 locale to the portals default locale. Finally it parses the date to a date object
6 and sets the page locale back to the original page locale -->
7
8<#assign displayDate = .vars['reserved-article-display-date'].data>
9<#setting time_zone = languageUtil.get(locale, "template-timezone")>
10<#assign originalLocale = locale>
11<#setting locale = localeUtil.getDefault()>
12<#assign displayDate = displayDate?date("EEE, d MMM yyyy HH:mm:ss Z")>
13<#setting locale = originalLocale>
14<#assign displayDate = displayDate?string("long")>
15
16<#-- end of common display date snippet -->
17
18
19
20<#-- assume we'll be using the default image -->
21<#assign heroDisplayStyle = "image">
22
23<#-- but immediately check if we should show an image at all -->
24<#if (Hide_hero_image_on_detail_page?? && Hide_hero_image_on_detail_page.getData() == "1")>
25 <#assign heroDisplayStyle = "none">
26</#if>
27
28<#-- then check if we should be using the Video instead and set vars -->
29<#if (Youtube_Video_Hero_.getData()?? && Youtube_Video_Hero_.getData()?has_content) >
30 <#assign heroDisplayStyle = "video">
31 <#assign yturl = Video_URL.getData()!"">
32 <#if yturl?contains("https://youtu.be/")>
33 <#assign index = yturl.indexOf('https://youtu.be/')>
34 <#assign index = index + 17>
35 </#if>
36 <#if yturl?contains("https://www.youtube.com/watch?v=")>
37 <#assign index = yturl.indexOf('https://www.youtube.com/watch?v=')>
38 <#assign index = index + 32>
39 </#if>
40 <#assign yturl2 = yturl.substring(index)>
41 <#assign linkURL = "https://www.youtube.com/embed/${yturl2}?rel=0&showinfo=0&autoplay=1">
42</#if>
43
44<#-- now, if we are still to use an image, let's pull additional File Entry details -->
45<#if heroDisplayStyle = "image">
46 <#-- set the default image and alt text -->
47 <#assign imgSrc = Image.getData() >
48 <#assign imgAltText = Content.getData() >
49
50 <#assign image_attributes = jsonFactoryUtil.createJSONObject(Image.getAttributes()) >
51 <#assign image_style = "">
52 <#assign instructionPath = "/cdn-cgi/image/h=345,q=85" >
53
54 <#-- use the alternate image if it is there -->
55 <#if Alternate_Hero_Image.getData()?has_content>
56 <#assign image_attributes = jsonFactoryUtil.createJSONObject(Alternate_Hero_Image.getAttributes()) >
57 <#assign image_style = "max-height: none;">
58 <#assign instructionPath = "/cdn-cgi/image/q=85" >
59 </#if>
60
61 <#-- set the base hostname url for environment (local/qa/stg/prod) -->
62 <#assign imageBaseUri = ui_config.getCdnCgiUri() >
63 <#-- determine if we want to use CDN Image Optimizations or not -->
64 <#if ui_config.getUseCdnImageOptimizations() >
65 <#-- add the instructions to use for optimizing the image(s) in this item -->
66 <#if !getterUtil.getBoolean(By_pass_Cloudflare_optimization.getData())>
67 <#assign imageBaseUri = imageBaseUri + instructionPath >
68 </#if>
69 </#if>
70
71 <#if (image_attributes.fileEntryId??) >
72 <#assign fileEntryId = image_attributes.fileEntryId?number >
73 <#assign fe = _dlfels.getFileEntry(fileEntryId)>
74 <#if fe??>
75 <#assign imgSrc = imageBaseUri + "/documents/" + fe.repositoryId +"/" + fe.fileEntryId + "/" + fe.fileName + "/" + fe.uuid + "?t=" + fe.modifiedDate?long >
76 <#assign imgAltText = image_attributes.alt!imgAltText >
77 </#if>
78 </#if>
79</#if>
80
81<#assign treePath = group_util.getGroupFriendlyUrlTreePath(groupId) />
82
83<div class="ay-news-release">
84
85 <h1 id="ay-artTitle" class="h2">${Content.getData()}</h1>
86
87 <#-- Show appropriate image if that is the style -->
88 <#if (heroDisplayStyle == "image") >
89 <img src="${imgSrc}" alt="${imgAltText}" style="${image_style}" >
90 </#if>
91
92 <#if (heroDisplayStyle = "video" && yturl?has_content) >
93 <div class="ay-video-firefox-extra-wrap">
94 <div class="ay-video-wrapper">
95 <#if !Image.getData().isEmpty()>
96 <a href="${linkURL}" target="youtubevideo" style=" background:url('${Image.getData()}') no-repeat center center; background-size:cover; " ></a>
97 </#if>
98 <div class="yt-container" video="${yturl2}"></div>
99
100 <script>
101 $(document).ready(function(){
102 $(".ay-video-wrapper a").bind("click",function(event){
103 if($(".cc-window").hasClass("cc-invisible") === true){
104 if($(".yt-container").html() !== ""){
105 $(this).css({display:'none'});
106 $(this).next().children().css({visibility:'visible'}).click();
107 }
108 }else{
109 event.preventDefault();
110 }
111
112 });
113 });
114 </script>
115 </div>
116 </div>
117 </#if>
118
119 <small>${displayDate}</small>
120
121 <div class="ay-news-release__content">
122 <#if SubTitle.getData()?has_content>
123 <h3 class="ay-news-release__subtitle">${SubTitle.getData()}</h3>
124 </#if>
125 ${News_Release_Detail_Content.getData()}
126 <#if Boiler_Plate_Content.getData()?has_content >
127 <div class="ay-news-release__boiler">
128 ${Boiler_Plate_Content.getData()}
129 </div>
130 </#if>
131 <div class="ay-news-release__social">
132 <a id="ay-email-to" href="#" target="_blank" class="ay-news-release__social--item">
133 <svg class="ay-news-release__social--icon">
134 <use xlink:href="/o/ay-theme/resources/images/images.svg#email" />
135 </svg>
136 </a>
137 <a id="ay-social-twitter" href="#" class="ay-news-release__social--item" target="_blank">
138 <svg class="ay-news-release__social--icon">
139 <use xlink:href="/o/ay-theme/resources/images/images.svg#twitter1" />
140 </svg>
141 </a>
142 <a id="ay-social-facebook" href="#" class="ay-news-release__social--item" target="_blank">
143 <svg class="ay-news-release__social--icon">
144 <use xlink:href="/o/ay-theme/resources/images/images.svg#facebook" />
145 </svg>
146 </a>
147 <a id="ay-social-linkedin" href="#" class="ay-news-release__social--item" target="_blank">
148 <svg class="ay-news-release__social--icon">
149 <use xlink:href="/o/ay-theme/resources/images/images.svg#linkedin1" />
150 </svg>
151 </a>
152 <#if treePath?contains("/ay/de/") >
153 <a id="ay-social-xming" href="#" class="ay-news-release__social--item" target="_blank">
154 <svg class="ay-news-release__social--icon">
155 <use xlink:href="/o/ay-theme/resources/images/images.svg#xing-social" />
156 </svg>
157 </a>
158 </#if>
159 </div>
160 </div>
161</div>
162<#assign newsTitle = Content.getData() />
163<script>
164 function socialLinks(){
165 uri=window.location;
166 uri=uri.toString();
167 ofLoc=$(".ay-header-options h3 a").html();
168 enc=encodeURIComponent(uri);
169 prtitle=$("#ay-artTitle").html();
170 //prtitle=prtitle.replace(/(\r\n\t|\n|\r\t)/gm,"");
171 prtitle=encodeURI(prtitle);
172 mailtoSub="Avison Young - "+ofLoc+" News: ";
173 mailtoSub=encodeURI(mailtoSub);
174 //alert(enc);
175 $("#ay-social-twitter").attr("href","https://twitter.com/intent/tweet?url="+enc+"&text="+prtitle+"&via=AvisonYoung");
176 $("#ay-social-facebook").attr("href","https://www.facebook.com/sharer/sharer.php?u="+enc);
177 $("#ay-social-linkedin").attr("href","https://www.linkedin.com/cws/share?url="+enc);
178 <#if treePath?contains("/ay/de/") >
179 $("#ay-social-xming").attr("href","https://www.xing.com/spi/shares/new?url="+enc);
180 </#if>
181 $("#ay-email-to").attr("href","mailto:?subject="+mailtoSub+prtitle+"&body="+enc);
182 }
183 $(document).ready(function(){
184 socialLinks();
185 })
186</script>
187
188<style>
189 .ay-news-release__content{
190 min-height:150px;
191 }
192</style>