Publicador de contenidos

angle-left Actividad - Club de Periodismo
Se ha producido un error al procesar la plantilla.
Java method "com.sun.proxy.$Proxy483.getArticle(long, String)" threw an exception when invoked on com.sun.proxy.$Proxy483 object "com.liferay.journal.service.impl.JournalArticleLocalServiceImpl@53d30157"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign resourcePrimKey = journalArti...  [in template "20116#20152#256695" at line 14, column 1]
----
1<#assign capacityEventsLocalService = serviceLocator.findService("dcn.events.service-service", "com.everis.liferay.dcn.service.CapacityEventsLocalService")> 
2<#assign inscriptionEventsLocalService = serviceLocator.findService("dcn.events.service-service", "com.everis.liferay.dcn.service.InscriptionEventsLocalService")> 
3<#assign journalArticleLocalServiceUtil = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
4<#assign MBMessageLocalServiceUtil = serviceLocator.findService("com.liferay.message.boards.kernel.service.MBMessageLocalService")> 
5<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")> 
6<#assign assetEntryLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService")> 
7<#assign dLFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")> 
8 
9 
10<#assign urlUnete = propsUtil.get("com.everis.dcn.new.account.page")/> 
11<#assign dateRealizacion = ""/> 
12<#assign resultCompare = 0> 
13<#assign articleId =.vars['reserved-article-id'].data/> 
14<#assign resourcePrimKey = journalArticleLocalServiceUtil.getArticle(groupId, articleId).getResourcePrimKey()> 
15<#assign userId =permissionChecker.getUserId()/> 
16<#assign statusUser = false/> 
17<#assign envioImagenes_Data = false/> 
18 
19<#assign urlTitle =.vars['reserved-article-url-title'].data/> 
20<#assign paginaGaleria = languageUtil.get(locale, "com.everis.liferay.dcn.galeria.actividades")/> 
21<#assign GroupService = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")> 
22<#assign urlGroup = GroupService.getGroup(groupId).getFriendlyURL()/> 
23 
24<#assign themeDisplay = request['theme-display'] /> 
25<#assign urlSiteDcn = GroupService.getGroup(groupId).getFriendlyURL()/> 
26<#assign urlGaleriaDinamic = paginaGaleria + "?urlTitle=" + urlTitle/> 
27 
28<#assign urlGaleria = ""/> 
29<#if permissionChecker.isSignedIn()> 
30   <#assign urlGaleria = urlGaleriaDinamic/> 
31<#else> 
32   <#assign urlGaleria = urlUnete/> 
33</#if> 
34 
35 
36<div id="detailsActivity" class="detailsActivity"> 
37  <#if imagen.getData() != ""> 
38  <div class="detailsActivity-image" style="background-image: url(${imagen.getData()})"> 
39  <#else> 
40  <div class="detailsActivity-image"> 
41  </#if> 
42    <#if fechaIni.getData() != ""> 
43        <#assign FechaInicio_Data = getterUtil.getString(fechaIni.getData())> 
44        <#assign fechaIniComplete = FechaInicio_Data + " " + hora.getData()> 
45        <#if validator.isNotNull(FechaInicio_Data)> 
46          <#assign FechaInicio_DateObj = dateUtil.parseDate("yyyy-MM-dd", FechaInicio_Data, locale)> 
47          <#assign dateRealizacion = dateUtil.getDate(FechaInicio_DateObj, "MMMM dd", locale)/> 
48          <#assign diaIni = dateUtil.getDate(FechaInicio_DateObj, "d", locale)/> 
49          <#assign mesIni = dateUtil.getDate(FechaInicio_DateObj, "MMM", locale)/> 
50          <#assign mesIniMayus = stringUtil.toUpperCase(mesIni, locale)/> 
51        </#if> 
52        <#if validator.isNotNull(fechaIniComplete)> 
53            <#assign dateTimeComplete = fechaIniComplete?datetime("yyyy-MM-dd HH:mm")> 
54            <#assign resultCompare = dateUtil.compareTo(dateUtil.newDate()?datetime, dateTimeComplete?datetime )> 
55        </#if> 
56    </#if> 
57  </div> 
58  <div class="detailsActivity-contents"> 
59    <div class="maxwidth"> 
60      <div class="row"> 
61        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> 
62          <div class="detailsActivity-header"> 
63            <#if ((diaIni != "") && (mesIniMayus != ""))> 
64              <div class="date-flag"><div>${diaIni}</div>${mesIniMayus}</div> 
65            </#if> 
66 
67            <#if titulo.getData() != ""> 
68              <div class="detailsActivity-title">${titulo.getData()}</div> 
69            </#if> 
70            <#if hora.getData() != ""> 
71              <div class="detailsActivity-hour">${hora.getData()}</div> 
72            </#if> 
73            <#if lugarCelebracion.getData() != ""> 
74              <div class="detailsActivity-site">${lugarCelebracion.getData()}</div> 
75            </#if> 
76          </div> 
77        </div> 
78      </div> 
79    </div> 
80          <#if getterUtil.getBoolean(aforo.getData())> 
81          <#assign aforoLimitado = languageUtil.get(locale, "com.everis.liferay.dcn.actividades.templates.aforoLimitado")/> 
82            <div class="box-warning">${aforoLimitado}</div> 
83          </#if> 
84    <#assign classDetails = "col-xs-12 col-sm-12 col-md-12 col-lg-12"> 
85    <#list temasATratar.getSiblings() as amountTemas> 
86           <#assign valores = amountTemas?index> 
87    </#list> 
88    <#if (temasATratar.getSiblings()?has_content && valores>0)> 
89        <#assign classDetails = "col-xs-12 col-sm-8 col-md-8 col-lg-8"> 
90    </#if> 
91    <div class="maxwidth"> 
92      <div class="row"> 
93        <div class="${classDetails}"> 
94          <#if subtitulo.getData() != ""> 
95             <div class="coloquio-title">${subtitulo.getData()}</div> 
96          </#if> 
97          <#if descripcionActividad.getData() != ""> 
98            <div class="coloquio">${descripcionActividad.getData()}</div> 
99          </#if> 
100		  			 
101			<#assign current = .now?date> 
102			<#assign currentDate = dateUtil.getDate(current, "dd MMMM yyyy", locale)/> 
103			<#assign fechaFin_Data = getterUtil.getString(fechaFin.getData())/> 
104			<#if validator.isNotNull(fechaFin_Data)> 
105				<#assign fechaFin_DateObj = dateUtil.parseDate("yyyy-MM-dd", fechaFin_Data, locale)/> 
106				<#assign endDate = fechaFin_DateObj?date/> 
107			</#if> 
108			<#if envioImagenes?has_content> 
109				<#assign envioImagenes_Data = getterUtil.getBoolean(envioImagenes.getData())> 
110			</#if> 
111			<#if endDate <= current || envioImagenes_Data> 
112			<a class="btn btn-bordered" href="${urlGaleria?string}" target="_blank"><i class="icon-camera"></i><@liferay.language key="com.everis.liferay.dcn.galeria.title"/></a> 
113			</#if> 
114			 
115			 
116		</div> 
117 
118 
119 
120          <#if (temasATratar.getSiblings()?has_content && valores>0)> 
121            <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4"> 
122                <div class="temasatratar"> 
123                  <#if labelTemasATratar.getData()!= ""> 
124                    <p>${labelTemasATratar.getData()}</p> 
125                  </#if> 
126                  <ul> 
127                  <#list temasATratar.getSiblings() as cur_temasATratar> 
128                   <#if cur_temasATratar.getData() != ""> 
129                     <li>${cur_temasATratar.getData()}</li> 
130                    </#if> 
131                  </#list> 
132                 </ul> 
133                </div> 
134            </div> 
135          </#if> 
136 
137      </div> 
138    </div> 
139  </div> 
140</div> 
141 
142<#if permissionChecker.isSignedIn()> 
143            <#--compruebo si existe inscripcion, si existe muestro mensaje--> 
144            <#if inscriptionEventsLocalService.findByuserIdYContentId(userId,articleId)?has_content> 
145                <#assign statusUser = true/> 
146                <div class="maxwidth"> 
147                  <br><br> 
148                <div class="alert alert-success"> 
149                <@liferay.language key="com.everis.liferay.dcn.actividades.inscripcion.correcta" /> 
150                </div> 
151              </div> 
152            <#else> 
153                <#assign statusUser = false/> 
154            </#if> 
155    </#if> 
156 
157  <#-- ***************bloque mapa**********--> 
158    <#assign latitude = 0 /> 
159    <#assign longitude = 0 /> 
160 
161    <#if geolocalizacion?has_content> 
162 
163        <#assign geolocationJSONObject = jsonFactoryUtil.createJSONObject(geolocalizacion.getData())> 
164 
165        <#assign latitude = geolocationJSONObject.getDouble("latitude")> 
166        <#assign longitude = geolocationJSONObject.getDouble("longitude")> 
167 
168        <#assign googleProjectAPIKey = "AIzaSyCZGRp6zlGhTAb9tMB5B4KGatTIYCnIo6s" /> 
169        <#assign jsPath = getterUtil.getString(request['theme-display']['path-theme-images'] + '/../js') /> 
170 
171 
172        <script src="${jsPath}/MapaActividades.js" ></script> 
173        <script src="https://maps.google.com/maps/api/js?v=3&libraries=geometry,places&key=${googleProjectAPIKey}&callback=MapaActividades.init" async defer></script> 
174 
175        <script type="text/javascript" > 
176        (function(){ 
177          MapaActividades.addPlace({ 
178              <#if titulo.getData() != ""> 
179                  titulo: "${titulo.getData()?js_string}", 
180              </#if> 
181              <#if lugarCelebracion.getData() != ""> 
182                 lugarCelebracion: "${lugarCelebracion.getData()?trim}", 
183              </#if> 
184              <#if hora.getData() != ""> 
185                hora: "${hora.getData()?trim}", 
186              </#if> 
187              lat: ${latitude?trim}, lng: ${longitude?trim}, 
188              id: "${articleId?trim}" 
189            }); 
190 
191            MapaActividades.init(${latitude?trim},${longitude?trim}); 
192        })(); 
193 
194        </script> 
195 
196        <div class="dcn-map main_wrapper_map"> 
197          <div class="wrapper_data"> 
198          </div> 
199          <div class="wrapper_map" > 
200            <div id="map_canvas" ></div> 
201          </div> 
202        </div> 
203    </#if> 
204    <#-- ***************fin bloque mapa**********--> 
205 
206    <#-- ***************incluimos bloque galeria de imaganes**********--> 
207    <#assign assetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", resourcePrimKey?long)> 
208    <#assign assetEntryLinsks = assetEntryLinkLocalService.getLinks(assetEntry.getEntryId())/> 
209 
210    <#assign arrayLinksView = []/> 
211    <#list assetEntryLinsks as link> 
212        <#if link.getEntryId1() == assetEntry.getEntryId()> 
213          <#assign arrayLinksView = arrayLinksView + [link.getEntryId2()]/> 
214      </#if> 
215    </#list> 
216    <#if arrayLinksView?has_content > 
217          <div class="header-title">Im&aacute;genes enviadas por los usuarios</div> 
218    </#if> 
219 
220    <div class="polaroid-carousel"> 
221        <div id="slider" class="flexslider"> 
222            <ul class="slides"> 
223            <#list arrayLinksView as linkFile> 
224                <#assign arrayLinksView = assetEntryLocalService.getAssetEntry(linkFile?long)/> 
225                <#if arrayLinksView.getClassName() == "com.liferay.document.library.kernel.model.DLFileEntry"> 
226                  <#if dLFileEntryLocalService.fetchDLFileEntry(arrayLinksView.getClassPK())?has_content> 
227                    <#assign dlFileEntry = dLFileEntryLocalService.fetchDLFileEntry(arrayLinksView.getClassPK())/> 
228                    <#assign urlImg = "/documents/" + dlFileEntry.groupId + "/" + dlFileEntry.getFolderId() + "/" + dlFileEntry.title + "/" + dlFileEntry.uuid /> 
229                <li class="box-carrousel-item"> 
230                  <div class="carrousel-item"> 
231                    <div class="carousel-item-contents"> 
232                      <img draggable="false" src="${urlImg}"> 
233                      <div class="flex-caption"><span>Enviada por:</span><strong>${dlFileEntry.getUserName()}</strong></div> 
234                    </div> 
235                  </div> 
236                </li> 
237              </#if> 
238                </#if> 
239            </#list> 
240            </ul> 
241        </div> 
242    </div> 
243<#-- ***************fin bloque galeria de imaganes**********--> 
244 
245 
246    <#if (resultCompare?number != 1)> 
247        <#if statusUser?string == "false"> 
248            <div id="inscripcion" class="box-propon"> 
249              <div class="maxwidth"> 
250 
251                   <div class="box-propon-title"><@liferay.language key="com.everis.liferay.dcn.actividades.inscripcion.teGustaria" /></div> 
252                   <div class="box-propon-description"><@liferay.language key="com.everis.liferay.dcn.actividades.inscripcion.texto" /></div> 
253                   <#if permissionChecker.isSignedIn()> 
254 
255                        <#if getterUtil.getBoolean(informacionAdicional.getData())> 
256                            <#if informacionAdicionalLabel.getData() != ""> 
257                            <label>${informacionAdicionalLabel.getData()}</label> 
258                            <div class="row aditional-row"> 
259                              <div class="col-xs-12 col-sm-6 col-md-6 col-md-offset-3"> 
260                                <input label="First Name" id="first-name" name="first-name" class="form-control"></input> 
261                               </div> 
262                            </div> 
263                         <#else> 
264                             <input type="hidden" id="first-name" name="first-name"></input> 
265                         </#if> 
266                        <#else> 
267                            <input type="hidden" id="first-name" name="first-name"></input> 
268                        </#if> 
269 
270                        <button id="add-inscription" class="btn btn-lg btn-primary">${languageUtil.get(locale, "com.everis.liferay.dcn.actividades.templates.inscriptionValueButon")}</button> 
271 
272                   <#else> 
273                        <a href="${urlUnete}" class="btn btn-lg btn-primary"><@liferay.language key="com.everis.liferay.dcn.actividades.inscripcion.inscribirmeButton" /></a> 
274                   </#if> 
275 
276              </div> 
277            </div> 
278        </#if> 
279    </#if> 
280 
281<#assign Messages = MBMessageLocalServiceUtil.getMessages("com.liferay.journal.model.JournalArticle", resourcePrimKey, 0) /> 
282<#assign MessagesCount = Messages?size-1 /> 
283<#if MessagesCount != -1> 
284<div class="maxwidth"> 
285  <div id="box-comments-result" class="box-comments"> 
286    ${languageUtil.get(locale, "comments")}: ${MessagesCount} 
287  </div> 
288</div> 
289<#else> 
290<div class="maxwidth"> 
291  <div id="box-comments-result" class="box-comments"> 
292    ${languageUtil.get(locale, "comments")}: 0 
293  </div> 
294</div> 
295</#if> 
296</div> 
297 
298<div id="inscriptionSucces" class="hidden"> 
299<div class="message-ok text-center"> 
300<div class="message-wrapper"> 
301    <#if ((imagen.getData() != "") && (titulo.getData() != ""))> 
302      <div class="img-success"></div> 
303    </#if> 
304    <div class="message-text"><@liferay.language key="com.everis.liferay.dcn.actividades.inscripcion.inscritoCorrectamente" /></div> 
305 
306    <div class="well"> 
307      <#if titulo.getData() != ""> 
308      <div class="message-title"><p>${titulo.getData()}</p></div> 
309    </#if> 
310      <#if lugarCelebracion.getData() != ""> 
311         <div class="message-place"><p>${lugarCelebracion.getData()}</p></div> 
312      </#if> 
313      <#if ((diaIni != "") && (mesIniMayus != ""))> 
314          <div class="message-date"><p>${diaIni} ${mesIni}</p></div> 
315      </#if> 
316    </div> 
317</div> 
318</div> 
319</div> 
320 
321<div id="inscriptionError" class="maxwidth hidden"> 
322<div class="alert alert-danger text-center"> 
323    <@liferay.language key="com.everis.liferay.dcn.actividades.inscripcion.inscriptionError" /> 
324</div> 
325 
326 
327<script type="text/javascript"> 
328 
329 
330    $(document).ready(function(){ 
331    // The slider being synced must be initialized first 
332    $('#carousel').flexslider({ 
333      animation: "slide", 
334      animationLoop: true, 
335      move: 1, 
336      itemWidth: 120, 
337      itemMargin: 10, 
338          asNavFor: '#slider' 
339    }); 
340 
341    $('#slider').flexslider({ 
342      animation: "slide", 
343      controlNav: false, 
344      animationLoop: false, 
345      slideshow: false, 
346      sync: "#carousel" 
347    }); 
348  }); 
349 
350var userId='${userId}'; 
351var groupId='${groupId}'; 
352var contentId='${articleId}'; 
353var emailUser=""; 
354 
355AUI().use('node','aui-tooltip',function(A){ 
356    var addUserButton = A.one('#add-inscription'); 
357 
358    var firstNameNode = A.one('#first-name'); 
359 
360    if (addUserButton != null){ 
361            addUserButton.on('click', function(event) { 
362            var inscription = Liferay.Service( 
363                  '/dcn.inscriptionevents/add-inscription-events', 
364
365                    groupId:groupId , 
366                    contentId: contentId, 
367                    userId:userId , 
368                    emailUser: '', 
369                    coments: firstNameNode.val() 
370                  }, 
371                  function(obj) { 
372                    console.log(obj); 
373                    if (obj === true){ 
374                        $('#inscriptionSucces').removeClass("hidden"); 
375                        $('#detailsActivity').addClass("hidden"); 
376            $('#inscripcion').addClass("hidden"); 
377            $('.dcn-map').addClass("hidden"); 
378            $('#box-comments-result').addClass("hidden"); 
379                        $('.pull-right').addClass("hidden"); 
380                        $('.asset-ratings').addClass("hidden"); 
381                        $('.taglib-discussion').addClass("hidden"); 
382                    }else{ 
383                        $('#inscriptionError').removeClass("hidden"); 
384
385
386                ); 
387 
388            console.log("result inscription" + inscription); 
389        }); 
390
391 
392}); 
393 
394</script>