Asset Publisher
developer user
Modified 1 Year ago.
An error occurred while processing the template.
The following has evaluated to null or missing:
==> productJson.getJSONArray("value") [in template "20096#20121#433825" at line 9, column 32]
----
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 productIdsJsonArray = product... [in template "20096#20121#433825" at line 9, column 1]
---- 1<#assign pageConfigJsonString = themeDisplay.getLayout().getExpandoBridge().getAttribute("PageConfigurations")?string> 2<#assign pageConfigJson = jsonFactoryUtil.createJSONObject(pageConfigJsonString) /> 3<#assign productJson = jsonFactoryUtil.createJSONObject(pageConfigJson.getString("Between2025-2026Products")) /> 4<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 5 6 7<#-- Extract the list of product IDs from the JSON array --> 8<#assign productIdsJsonArray = productJson.getJSONArray("value") /> 9 10<#-- Convert JSON array to a list --> 11<#assign productIds = []> 12<#list 0..(productIdsJsonArray.length() - 1) as i> 13 <#assign productIds += [productIdsJsonArray.getString(i)]> 14</#list> 15 16<section class="section tutoring-packages products_area pt-0"> 17 <div class="container"> 18 <div class="default-heading"> 19 <h2> 20 <#if (title.getData())??> 21 ${title.getData()} 22 </#if> 23 </h2> 24 </div> 25 <div class="row justify-content-center justify-content-lg-start"> 26 <#assign counter=0> 27 <#list productIds as productArticleId> 28 <div class="col-12 col-sm-6 col-md-6 col-lg-4 col-xl-3 card-group"> 29 <#assign journalArticle=JournalArticleLocalService.getArticle(themeDisplay.scopeGroupId,productArticleId?string)> 30 <@liferay_journal["journal-article"] articleId=journalArticle.getArticleId() 31 ddmTemplateKey=journalArticle.getDDMTemplate().getTemplateKey() 32 groupId=journalArticle.getGroupId() 33 /> 34 <#assign counter=counter + 1> 35 </div> 36 </#list> 37 38 </div> 39 </div> 40</section>