pruebaaa
Ocorreu um erro ao processar o template.
Java method "com.iberdrola.liferay.freemarker.utilities.impl.FreemarkerUtilitiesImpl.getPreviosAndNextBlog(Long, String, com.liferay.portal.kernel.theme.ThemeDisplay)" threw an exception when invoked on com.iberdrola.liferay.freemarker.utilities.impl.FreemarkerUtilitiesImpl object "com.iberdrola.liferay.freemarker.utilities.impl.FreemarkerUtilitiesImpl@601c552b"; see cause exception in the Java stack trace.
----
FTL stack trace ("~" means nesting-related):
- Failed at: #assign navigationUrls = freemarkerUt... [in template "46661#46701#34525420" at line 21, column 1]
----
1<#setting url_escaping_charset='utf-8'>
2
3<#assign
4JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")
5WorkflowConstants = staticUtil["com.liferay.portal.kernel.workflow.WorkflowConstants"]
6DLURLHelper = serviceLocator.findService("com.liferay.document.library.util.DLURLHelper")
7DLAppService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppLocalService")
8AssetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")
9AssetCategoryServiceUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")
10AssetVocabularyLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")
11freemarkerUtilities = serviceLocator.findService("com.iberdrola.liferay.freemarker.utilities.api.FreemarkerUtilities")
12articleId = .vars['reserved-article-id'].data
13article = JournalArticleLocalService.getLatestArticle(groupId, articleId, WorkflowConstants.STATUS_APPROVED)
14articleContent = article.getContentByLocale(locale)
15docXml = saxReaderUtil.read(article.getContentByLocale(locale))
16actualURL = themeDisplay.getURLCurrent()?replace("/-/","")
17stringPattern = "dd '" + languageUtil.get(locale, "of") + "' MMMM yyyy"
18fechaModificacion = dateUtil.getDate(article.getDisplayDate(), stringPattern, locale)
19categories = AssetCategoryServiceUtil.getCategories(article.getModelClassName(), article.getResourcePrimKey())
20>
21<#assign navigationUrls = freemarkerUtilities.getPreviosAndNextBlog(article.getResourcePrimKey()?number,actualURL,themeDisplay) >
22
23<#if categories?has_content>
24 <#list categories as category>
25 <#assign categoryURL = category.getName()?replace("á","a")?replace("é","e")?replace("í","i")?replace("ó","o")?replace("ú","u")?replace(" ","-") />
26 <#assign parentCategoryId = category.getParentCategoryId()/>
27 <#assign vocabularyId = category.getVocabularyId() />
28 <#assign parentCategory = AssetCategoryServiceUtil.getAssetCategory(parentCategoryId)/>
29 <#assign parentCategoryURL =parentCategory.getName()?replace("á","a")?replace("é","e")?replace("í","i")?replace("ó","o")?replace("ú","u")?replace(" ","-") />
30 </#list>
31</#if>
32<#if vocabularyId?has_content>
33 <#assign vocabularyName = AssetVocabularyLocalService.fetchAssetVocabulary(vocabularyId).getName()/>
34</#if>
35
36<#if contenuWebnvoa?? &&contenuWebnvoa.getData()?? && contenuWebnvoa.getData() !="">
37 <#assign contenidoSeleccionadoString = contenuWebnvoa.getData() >
38 <#assign contenidoSeleccionado = contenuWebnvoa.getData()?eval >
39 <#assign selectedContent = JournalArticleLocalService.fetchJournalArticleByUuidAndGroupId(contenidoSeleccionado.uuid,groupId) />
40 <#if selectedContent??>
41 <div class="hide col-md-12 portlet-column portlet-column-only yui3-dd-drop" id="contenidSeleccionadoDiv">
42 <@liferay_journal["journal-article"]
43 articleId =selectedContent.getArticleId()
44 ddmTemplateKey=selectedContent.getDDMTemplateKey()
45 groupId = groupId/>
46 </div>
47 </#if>
48</#if>
49
50
51<div class="ibd-blog-detail">
52 <div class="ibd-blog-detail__body">
53 <div id="navegacion-enlace-back-blog">
54 <a class="Btn_link_home_blog" href="/${parentCategoryURL?lower_case}"><div class="blogLinkBackIcon"></div> <div class="blogLinkBackText">Voltar a Media</div></a>
55 </div>
56 <div class="ibd-blog-detail__text">${contentBlog.getData()}</div>
57
58 <div class="contenido-blog-navegacion-completo">
59 <#if navigationUrls?has_content>
60 <div id="navegacion-enlace">
61 <a class="Btn_link_home_blog" href="/sobre-nos/media/${categoryURL?lower_case}/${navigationUrls[0]}"><div class="blogLinkBackIcon"></div> <div class="blogLinkBackText">Anterior</div></a>
62 </div>
63 <div id="navegacion-enlace">
64 <a class="Btn_link_home_blog" href="/sobre-nos/media/${categoryURL?lower_case}/${navigationUrls[1]}"> <div class="blogLinkBackText">Seguinte</div> <div class="blogLinkBackIconDerech"></div></a>
65 </div>
66 </#if>
67 </div>
68 </div>
69 <#-- RRSS -->
70
71 <div class="ibd-blog-detail__social-networks">
72 <h3>Partilhar</h3>
73 <div class="ibd-blog-detail__social-networks-icons">
74 <#if selectReseaux??>
75 <#if selectReseaux.getOptions()?seq_contains("Facebook")>
76 <a href="https://www.facebook.com/sharer/sharer.php?u=${themeDisplay.getPortalURL()}/sobre-nos/media/${actualURL}"><img class="imgRrss" src="/o/iberdrola-pt-theme/images/blog/RRSS_Facebook.svg" alt=""></a>
77 </#if>
78 <#if selectReseaux.getOptions()?seq_contains("Twitter")>
79 <a href="https://twitter.com/intent/tweet?url=${themeDisplay.getPortalURL()}/sobre-nos/media/${actualURL}"><img class="imgRrss" src="/o/iberdrola-pt-theme/images/blog/RRSS_Twitter.svg" alt=""></a>
80 </#if>
81 <#if selectReseaux.getOptions()?seq_contains("Whatsapp")>
82 <a href="https://api.whatsapp.com/send?text=${themeDisplay.getPortalURL()}/sobre-nos/media/${actualURL}"><img class="imgRrss" src="/o/iberdrola-pt-theme/images/blog/RRSS_Whatsapp.svg" alt=""></a>
83 </#if>
84 <#if selectReseaux.getOptions()?seq_contains("Linkedin")>
85 <a href="https://www.facebook.com/sharer/sharer.php?u=${themeDisplay.getPortalURL()}/sobre-nos/media/${actualURL}"><img class="imgRrss" src="/o/iberdrola-pt-theme/images/blog/RRSS_Linkedin.svg" alt=""></a>
86 </#if>
87 </#if>
88 <#if IconRedes??>
89 <#list IconRedes.getSiblings() as link>
90 <#assign urlRedesSociales = "#" />
91 <#assign IconRedes = "#" />
92 <#-- URL REDES SOCIALES -->
93 <#if link?? && link.urlRedes.getData()?? && link.getData()?? && link.getData()?has_content>
94 <#assign urlRedesSociales = link.urlRedes.getData() />
95 <#assign IconRedes = link.getData() />
96 <a href="${urlRedesSociales}"><img class="imgRrss" src="${IconRedes}" alt=""></a>
97 </#if>
98
99 </#list>
100 </#if>
101 <a id="ibd-blog-detail__social-networks-blog" href="#" onclick="copyToClipboard()" class="aImgTwitter" onfocusout="hideMessage()">
102 <img class="imgRrss" src="/o/iberdrola-pt-theme/images/blog/Link-Thick.svg" alt="">
103 <span style="display:none" id="copyLink">Link copiado</span>
104 </img>
105 </a>
106 </div>
107 </div>
108 <#-- FIN RRSS -->
109</div>
110
111<script>
112 document.addEventListener("DOMContentLoaded", function() {
113 var divOriginal = document.getElementById("column-1");
114 var nuevoDiv = document.getElementById("contenidSeleccionadoDiv");
115 if(nuevoDiv){
116 window.scrollTo({ top: -1, behavior: 'instant' });
117 divOriginal.innerHTML = nuevoDiv.innerHTML;
118 }
119
120 });
121 function copyToClipboard() {
122
123 navigator.clipboard.writeText(window.location.href);
124 document.getElementById("copyLink").style.display= '';
125
126 }
127
128 function hideMessage() {
129 document.getElementById("copyLink").style.display= 'none';
130 }
131</script>
Ocorreu um erro ao processar o template.
Java method "com.sun.proxy.$Proxy1278.getArticleByUrlTitle(long, String)" threw an exception when invoked on com.sun.proxy.$Proxy1278 object "com.liferay.journal.service.impl.JournalArticleLocalServiceImpl@88875d4"; see cause exception in the Java stack trace.
----
FTL stack trace ("~" means nesting-related):
- Failed at: #assign journalArticle = journalArtic... [in template "46661#46701#31169860" at line 7, column 1]
----
1<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")>
2<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")>
3
4<#assign actualCategoryURLName = themeDisplay.getURLCurrent()?replace("/-/","")>
5
6
7<#assign journalArticle = journalArticleLocalService.getArticleByUrlTitle(themeDisplay.getScopeGroupId(),actualCategoryURLName) >
8<#assign assetEntry = assetEntryLocalService.fetchEntry("com.liferay.journal.model.JournalArticle", journalArticle.getResourcePrimKey()) >
9<#assign categoryName = assetEntry.getCategories()[0].getName()>
10<#assign categories = assetEntry.getCategories() />
11<div class="ibd-blog__tags">
12 <h3>Categoria</h3>
13
14<#if entries?has_content && categories?has_content>
15 <ul class="ibd-blog__cat-container">
16 <#list entries as navigationEntry>
17 <#list categories as category>
18 <#if category.getName() == navigationEntry.getName()>
19 <li>
20 <a href="${navigationEntry.getURL()}" class="ibd-blog__cat-select">${navigationEntry.getName()}</a>
21 </li>
22 </#if>
23 </#list>
24 </#list>
25 </ul>
26 </#if>
27
28</div>
Ocorreu um erro ao processar o template.
The following has evaluated to null or missing:
==> JournalArticleLocalService.fetchArticleByUrlTitle(themeDisplay.getLayout().getGroupId(),actualURL) [in template "46661#46701#31169865" at line 12, column 20]
----
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 journal = JournalArticleLocal... [in template "46661#46701#31169865" at line 12, column 1]
----
1<div class="ibd-blog__related">
2 <#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") >
3<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService") >
4<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") >
5<#assign assetCategoryServiceUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") >
6<#assign assetEntryLocalServiceUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") >
7<#assign assetEntryLocalServiceUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") >
8<#assign freemarkerUtilities = serviceLocator.findService("com.iberdrola.liferay.freemarker.utilities.api.FreemarkerUtilities")>
9
10<#assign actualURL = themeDisplay.getURLCurrent()?replace("/-/","")>
11
12<#assign journal = JournalArticleLocalService.fetchArticleByUrlTitle(themeDisplay.getLayout().getGroupId(),actualURL) >
13<#assign articlePk = journal.getResourcePrimKey()?number >
14<#assign navigationUrls = freemarkerUtilities.getPreviosAndNextBlog(articlePk,actualURL,themeDisplay) >
15<#assign categories = assetCategoryServiceUtil.getCategories("com.liferay.journal.model.JournalArticle", articlePk)>
16<#assign journalEntries = freemarkerUtilities.getNJournalFormCategories(3,articlePk, categories)>
17<#if categories?has_content>
18 <#list categories as category>
19 <#assign categoryURL = category.getName()?replace("á","a")?replace("é","e")?replace("í","i")?replace("ó","o")?replace("ú","u")?replace(" ","-") />
20 </#list>
21</#if>
22<#if !categoryURL??>
23 <#assign categoryURL = "" />
24</#if>
25 <h3>Notícias relacionadas</h3>
26 <ul class="show-quick-actions-on-hover ibd-blog__related-content">
27 <#list journalEntries>
28 <#items as journal>
29 <#assign urlContent = "/sobre-nos/media/" + journal.urlTitle?lower_case >
30
31 <#assign docXml = saxReaderUtil.read(journal.getContentByLocale(locale)) >
32 <#assign titulo = docXml.valueOf("//dynamic-element[@name='title']/dynamic-content/text()") >
33 <#assign descripcion = docXml.valueOf("//dynamic-element[@name='description']/dynamic-content/text()") >
34 <#assign stringPattern = "dd '" + languageUtil.get(locale, "of") + "' MMMM yyyy" >
35 <#assign fechaModificacion = dateUtil.getDate(journal.getModifiedDate(), stringPattern, locale) >
36
37 <li class="ibd-blog__related-content-item">
38 <a class="ibd-blog__related-content-info autofit-col autofit-col-expand" href="${urlContent}">
39 <div class="ibd-blog__related-content-title-datetime">
40 <p class="ibd-blog__related-content-date list-group-subtitle">${fechaModificacion}</p>
41 </div>
42 <p class="ibd-blog__related-content-title h4 list-group-title text-truncate" title="${titulo}">
43 ${titulo}
44 </p>
45 <p class="ibd-blog__related-content-description list-group-subtitle text-truncate">${descripcion}</p>
46 </a>
47 <div class="autofit-col d-none"></div>
48 </li>
49 </#items>
50
51 </#list>
52 </ul>
53 <div class="contenido-blog-navegacion-categorias d-flex d-xl-none">
54 <#if navigationUrls?has_content>
55 <div id="navegacion-enlace">
56
57 <a class="link_home_blog" href="/sobre-nos/media/${navigationUrls[0]}"><i></i> Anterior </a>
58 </div>
59 <div id="navegacion-enlace">
60 <a class="link_home_blog" href="/sobre-nos/media/${navigationUrls[1]}">Seguinte <i></i></a>
61
62 </div>
63
64 </#if>
65 </div>
66</div>