<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>freeMarkerPortletPreferences has evaluated to null or missing</title>
  <link rel="self" href="https://liferay.dev/de/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114805146" />
  <subtitle>freeMarkerPortletPreferences has evaluated to null or missing</subtitle>
  <id>https://liferay.dev/de/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114805146</id>
  <updated>2026-06-01T03:20:26Z</updated>
  <dc:date>2026-06-01T03:20:26Z</dc:date>
  <entry>
    <title>RE: freeMarkerPortletPreferences has evaluated to null or missing</title>
    <link rel="alternate" href="https://liferay.dev/de/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121522353" />
    <author>
      <name>Luis Guzman</name>
    </author>
    <id>https://liferay.dev/de/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121522353</id>
    <updated>2022-09-26T15:49:25Z</updated>
    <published>2022-09-26T00:37:11Z</published>
    <summary type="html">&lt;p&gt;Estoy migrando un tema a las 7.2 y llevo tiempo comprenderlo, se
  resuelve de la siguiente manera:&lt;/p&gt;
&lt;p&gt;
  &lt;strong&gt;SOLUCION&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;#assign&lt;/p&gt;
&lt;p&gt;    freeMarkerPortletPreferences = freeMarkerPortletPreferences.getPreferences({&lt;/p&gt;
&lt;p&gt;    &amp;quot;portletSetupPortletDecoratorId&amp;quot;: &amp;quot;barebone&amp;quot;,&lt;/p&gt;
&lt;p&gt;    &amp;quot;groupId&amp;quot;:theme_display.getCompanyGroupId()?string,,&lt;/p&gt;
&lt;p&gt;    &amp;quot;articleId&amp;quot;: ''&lt;/p&gt;
&lt;p&gt;    })&lt;/p&gt;
&lt;p&gt;/&amp;gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&amp;lt;@liferay_portlet[&amp;quot;runtime&amp;quot;]&lt;/p&gt;
&lt;p&gt;    defaultPreferences=&amp;quot;${freeMarkerPortletPreferences}&amp;quot;&lt;/p&gt;
&lt;p&gt;    portletProviderAction=portletProviderAction.VIEW&lt;/p&gt;
&lt;p&gt;    instanceId=&amp;quot;modalfacebookdos&amp;quot;&lt;/p&gt;
&lt;p&gt;    portletName=&amp;quot;com_liferay_journal_content_web_portlet_JournalContentPortlet&amp;quot;&lt;/p&gt;
&lt;p&gt;/&amp;gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;
  &lt;em&gt;Metodo &lt;strong&gt;RESET &lt;/strong&gt;ya no es necesario para la version 7.2 &lt;/em&gt;&lt;/p&gt;</summary>
    <dc:creator>Luis Guzman</dc:creator>
    <dc:date>2022-09-26T00:37:11Z</dc:date>
  </entry>
  <entry>
    <title>RE: freeMarkerPortletPreferences has evaluated to null or missing</title>
    <link rel="alternate" href="https://liferay.dev/de/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114810294" />
    <author>
      <name>Jacek Koziel</name>
    </author>
    <id>https://liferay.dev/de/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114810294</id>
    <updated>2019-08-20T09:35:59Z</updated>
    <published>2019-08-20T09:35:59Z</published>
    <summary type="html">i have downloaded the sources and in liferay 7.2, the methods: reset, setValue, setValues has been removed from TemplatePortletPreferences.&lt;br /&gt;So in Liferay 7.2 you should use freeMarkerPortletPreferences .getProperties(propertiesMap) , where propertiesMap is Map&amp;lt;String,Object&amp;gt;</summary>
    <dc:creator>Jacek Koziel</dc:creator>
    <dc:date>2019-08-20T09:35:59Z</dc:date>
  </entry>
  <entry>
    <title>freeMarkerPortletPreferences has evaluated to null or missing</title>
    <link rel="alternate" href="https://liferay.dev/de/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114805145" />
    <author>
      <name>Jacek Koziel</name>
    </author>
    <id>https://liferay.dev/de/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114805145</id>
    <updated>2019-08-19T16:22:47Z</updated>
    <published>2019-08-19T16:22:47Z</published>
    <summary type="html">Hi,i have migrated a custom theme from Liferay 7.0 to Liferay 7.2. The theme deploys without any errors.&lt;br /&gt;In the theme, in portal_normal.ftl i have  a runtime portlet (JournalContentPortlet  to display an article)&lt;br /&gt;&lt;br /&gt; &amp;lt;#assign topBarSection = journalArticleLocalService.getLatestArticleByUrlTitle(themeDisplay.getScopeGroupId(), &amp;#34;top-bar-section&amp;#34;, 0)&amp;gt;&lt;br /&gt; &amp;lt;#assign VOID = freeMarkerPortletPreferences.setValue(&amp;#34;portletSetupPortletDecoratorId&amp;#34;, &amp;#34;borderless&amp;#34;) /&amp;gt;&lt;br /&gt;        &amp;lt;#assign theme_groupID = htmlUtil.escape(theme_display.getCompanyGroupId()?string) /&amp;gt;&lt;br /&gt;        &amp;lt;#assign VOID = freeMarkerPortletPreferences.setValue(&amp;#34;groupId&amp;#34;, &amp;#39;${group_id}&amp;#39;) /&amp;gt;&lt;br /&gt;        &amp;lt;#assign VOID = freeMarkerPortletPreferences.setValue(&amp;#34;articleId&amp;#34;, &amp;#39;${topBarSection.getArticleId()}&amp;#39;) /&amp;gt;&lt;br /&gt;        &amp;lt;@liferay_portlet[&amp;#34;runtime&amp;#34;]&lt;br /&gt;        defaultPreferences=&amp;#34;${freeMarkerPortletPreferences}&amp;#34;&lt;br /&gt;        portletProviderAction=portletProviderAction.VIEW&lt;br /&gt;        instanceId=&amp;#34;topbarcontent&amp;#34;&lt;br /&gt;        portletName=&amp;#34;com_liferay_journal_content_web_portlet_JournalContentPortlet&amp;#34; /&amp;gt;&lt;br /&gt;        ${freeMarkerPortletPreferences.reset()}&lt;br /&gt;&lt;br /&gt;Im using freeMarkerPortletPreferences to set the runtime portlet preferences.&lt;br /&gt;Unfortunatelly i get an exception at the line  &amp;lt;#assign VOID = freeMarkerPortletPreferences.setValue(&amp;#34;portletSetupPortletDecoratorId&amp;#34;, &amp;#34;borderless&amp;#34;) /&amp;gt;&lt;br /&gt;&lt;strong&gt;The following has evaluted to null or missing:&lt;br /&gt;==&amp;gt; freeMarkerPortletPreferences.setValue [in template &amp;#34;mytheme_SERVLET_CONTEXT_/templates/portal_normal.ftl&amp;#34; at line 120, column 24]&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;It did work in the Liferay 7.0 CE. Now it seems like the freeMarkerPortletPreferences variable is null, so running a setter causes an exception. In portal-ext.properties i have:&lt;br /&gt;freemarker.engine.restricted.classes=&lt;br /&gt;freemarket.engine.restricted.variables=&lt;br /&gt;&lt;br /&gt;Does anybody have any idea what might be the problem?&lt;br /&gt;Im using some other freemarker variables also(like ServiceLocator to get a service reference) an they work fine.</summary>
    <dc:creator>Jacek Koziel</dc:creator>
    <dc:date>2019-08-19T16:22:47Z</dc:date>
  </entry>
</feed>
