<?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>RE: Need Help with Freemarker WCM Templates</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=73386693" />
  <subtitle>RE: Need Help with Freemarker WCM Templates</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=73386693</id>
  <updated>2026-04-04T09:25:06Z</updated>
  <dc:date>2026-04-04T09:25:06Z</dc:date>
  <entry>
    <title>RE: Need Help with Freemarker WCM Templates</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119186992" />
    <author>
      <name>Christoph Rabel</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119186992</id>
    <updated>2020-05-19T07:10:14Z</updated>
    <published>2020-05-19T07:10:14Z</published>
    <summary type="html">We use serviceLocator quite often, BUT there is a cleaner approach. You can add your own services to templates and call them from there:&lt;br /&gt;&lt;a href="https://help.liferay.com/hc/en-us/articles/360018170931-Template-Context-Contributor"&gt;https://help.liferay.com/hc/en-us/articles/360018170931-Template-Context-Contributor&lt;/a&gt;&lt;br /&gt;Please note that it only works &amp;#34;as expected&amp;#34; from 7.0.0 DXP SP7 and up:&lt;br /&gt;&lt;a href="https://issues.liferay.com/browse/LPS-76631"&gt;https://issues.liferay.com/browse/LPS-76631&lt;/a&gt;</summary>
    <dc:creator>Christoph Rabel</dc:creator>
    <dc:date>2020-05-19T07:10:14Z</dc:date>
  </entry>
  <entry>
    <title>RE: Need Help with Freemarker WCM Templates</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119189322" />
    <author>
      <name>Lee Jordan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119189322</id>
    <updated>2020-05-18T21:28:55Z</updated>
    <published>2020-05-18T21:28:55Z</published>
    <summary type="html">How can I sell this proposition to my technical lead? I need to open up production to vulnerabilities and possibly have the server not restart ... in order to complete a template??</summary>
    <dc:creator>Lee Jordan</dc:creator>
    <dc:date>2020-05-18T21:28:55Z</dc:date>
  </entry>
  <entry>
    <title>RE: Need Help with Freemarker WCM Templates</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118351115" />
    <author>
      <name>Lee Jordan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118351115</id>
    <updated>2020-01-27T22:15:25Z</updated>
    <published>2020-01-27T22:15:25Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;div class="quote-title"&gt;Christoph Rabel:&lt;/div&gt;&lt;blockquote&gt;&lt;br&gt;In Liferay 7 the configuration was moved from portal.properties to the new configuration store.&lt;br&gt;&lt;br&gt;Control Panel -&amp;gt; Configuration -&amp;gt; System Settings -&amp;gt; Foundation -&amp;gt; FreeMarker Engine -&amp;gt; Restricted Variables.&lt;br&gt;&lt;/blockquote&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;7.2 Update add another step in the navigation ...&lt;br&gt;&lt;br&gt;Control Panel -&amp;gt; Configuration -&amp;gt; System Settings -&amp;gt; Platform -&amp;gt; Template Engines -&amp;gt; FreeMarker Engine -&amp;gt; Restricted Variables - Repeatable Fields&lt;br&gt;&lt;br&gt;And I found this file&lt;br&gt;&lt;a href="https://github.com/liferay/liferay-portal/blob/master/modules/apps/portal-template/portal-template-freemarker/src/main/java/com/liferay/portal/template/freemarker/configuration/FreeMarkerEngineConfiguration.java"&gt;https://github.com/liferay/liferay-portal/blob/master/modules/apps/portal-template/portal-template-freemarker/src/main/java/com/liferay/portal/template/freemarker/configuration/FreeMarkerEngineConfiguration.java&lt;/a&gt;&lt;br&gt;With:&lt;br&gt;&lt;pre&gt;&lt;code&gt;@Meta.AD(
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;deflt = "httpUtilUnsafe|objectUtil|serviceLocator|staticFieldGetter|staticUtil|utilLocator",
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;name = "restricted-variables", required = false
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;)
&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Lee Jordan</dc:creator>
    <dc:date>2020-01-27T22:15:25Z</dc:date>
  </entry>
  <entry>
    <title>RE: Need Help with Freemarker WCM Templates</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118350402" />
    <author>
      <name>Lee Jordan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118350402</id>
    <updated>2020-01-27T21:48:39Z</updated>
    <published>2020-01-27T21:48:39Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Just adding to this, slightly different need. Not having that navigation tree in the product menu is a huge barrier to an upgrade. Our users will have lost the ability to navigate their sites. Often the pages are "hidden from navigation". So the Sitemap portlet isn't working out as a replacement for the lost tree.&lt;br&gt;&lt;br&gt;I too have spent too much time trying to get a list of site pages from Liferay. I could swear but I won't. I looked at it before Christmas and have picked it back up and still no hope in sight for accessing these variables.&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;Caused by: freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:_==&amp;amp;gt; serviceLocator.findService("com.liferay.portal.service.LayoutLocalServiceUtil") &amp;amp;nbsp;[in template "mercury-theme_SERVLET_CONTEXT_/templates/init_custom.ftl" at line 55, column 26]__
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;Miserable.&amp;nbsp; I'm a front end developer and can't access template variables?&amp;nbsp;Absolutely miserable experience and a waste of time tying to put on a band aid to something that should never have been removed in the first place. As a front end dev I don't have the knowledge to go fix your product for me to restore a feature that should never have been removed.&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Lee Jordan</dc:creator>
    <dc:date>2020-01-27T21:48:39Z</dc:date>
  </entry>
  <entry>
    <title>RE: Need Help with Freemarker WCM Templates</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117310846" />
    <author>
      <name>Michael El Khoury</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117310846</id>
    <updated>2019-09-29T04:42:35Z</updated>
    <published>2019-09-29T04:42:35Z</published>
    <summary type="html">Masoud, what error you&amp;#39;re getting exacly? i might be able to help</summary>
    <dc:creator>Michael El Khoury</dc:creator>
    <dc:date>2019-09-29T04:42:35Z</dc:date>
  </entry>
  <entry>
    <title>RE: Need Help with Freemarker WCM Templates</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111002235" />
    <author>
      <name>Masoud Salehisedeh</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111002235</id>
    <updated>2018-09-20T20:08:00Z</updated>
    <published>2018-09-20T20:08:00Z</published>
    <summary type="html">&lt;p&gt;I am trying to display content of a journal from within a journal. I
  went to &amp;quot;Control Panel -&amp;gt; Configuration -&amp;gt; System Settings
  -&amp;gt; Template Engines -&amp;gt; FreeMarker Engine -&amp;gt; Restricted
  Variables&amp;quot; and pretty much removed all variables and classes.  I
  only have java.lang.Class and java.lang.Thread in restricted classes
  and still get the error. my code : &lt;/p&gt;
&lt;p&gt;&amp;lt;#assign journalArticleService =
  serviceLocator.findService(&amp;quot;com.liferay.journal.service.JournalArticleLocalService&amp;quot;)
  /&amp;gt; &lt;br /&gt; &amp;lt;#assign paragraphArticle =
  journalArticleService.fetchLatestArticle(author_map.getLong(&amp;quot;classPK&amp;quot;))
  /&amp;gt; &lt;br /&gt; &amp;lt;#if paragraphArticle??&amp;gt;
  ${journalArticleService.getArticleContent(paragraphArticle,
  paragraphArticle.getDDMTemplateKey(),  &amp;quot;&amp;quot;,
  languageUtil.getLanguageId(locale), themeDisplay)}&amp;lt;/#if&amp;gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;What Am I Missing?&lt;/p&gt;</summary>
    <dc:creator>Masoud Salehisedeh</dc:creator>
    <dc:date>2018-09-20T20:08:00Z</dc:date>
  </entry>
  <entry>
    <title>RE: Need Help with Freemarker WCM Templates</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110688198" />
    <author>
      <name>Joshua Turner</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110688198</id>
    <updated>2018-08-13T16:27:46Z</updated>
    <published>2018-08-13T16:27:46Z</published>
    <summary type="html">&lt;p&gt;This is friggin crazy.&lt;/p&gt;</summary>
    <dc:creator>Joshua Turner</dc:creator>
    <dc:date>2018-08-13T16:27:46Z</dc:date>
  </entry>
  <entry>
    <title>RE: Need Help with Freemarker WCM Templates</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=94827735" />
    <author>
      <name>Yannis Sinadinos</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=94827735</id>
    <updated>2017-09-13T09:18:48Z</updated>
    <published>2017-09-13T09:18:48Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;div class="quote-title"&gt;Christoph Rabel:&lt;/div&gt;&lt;blockquote&gt;No idea what the problem is.&lt;br&gt;I'd try to delete the cfg file (or maybe move it away). Maybe it works afterwards. If so, I would try to repeat the steps to remove the restricted variables again through the frontend.&lt;br&gt;&lt;br&gt;And then I would open a ticket with Liferay. Creating the file should work and your server should start up without an issue.&lt;/blockquote&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Hi, is there a clear solution for this issue? I followed the same steps and didn't work for me...&lt;br&gt;&lt;br&gt;The set "restrictedValiables = " to cfg file in ..bundle/osgi/config folder but it is not working. &lt;br&gt;&lt;br&gt;I try to use staticUtil method&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;    &amp;amp;lt;#assign fileEntry = staticUtil["com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil"]&amp;amp;gt;
    &amp;amp;lt;#assign file = fileEntry.getFileEntryByUuidAndGroupId(uuId,groupId)&amp;amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;and i get the following error: &lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;No error description was specified for this error; low-level message: java.lang.ClassNotFoundException: com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil cannot be found by com.liferay.portal.template.freemarker_2.0.24
----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign fileEntry = staticUtil["com.l...  [in template "20116#20152#45193" at line 26, column 5]&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Yannis Sinadinos</dc:creator>
    <dc:date>2017-09-13T09:18:48Z</dc:date>
  </entry>
  <entry>
    <title>RE: Need Help with Freemarker WCM Templates</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=91622060" />
    <author>
      <name>Vincent G.</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=91622060</id>
    <updated>2017-07-10T10:24:52Z</updated>
    <published>2017-07-10T10:24:52Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;I replaced the content of the file with &lt;pre&gt;&lt;code&gt;restrictedVariable=&lt;/code&gt;&lt;/pre&gt;, restarted and it finally worked! Thanks for your support, Christopher!&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Vincent G.</dc:creator>
    <dc:date>2017-07-10T10:24:52Z</dc:date>
  </entry>
  <entry>
    <title>RE: Need Help with Freemarker WCM Templates</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=91560465" />
    <author>
      <name>Christoph Rabel</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=91560465</id>
    <updated>2017-07-07T18:56:13Z</updated>
    <published>2017-07-07T18:56:13Z</published>
    <summary type="html">No idea what the problem is.&lt;br /&gt;I&amp;#39;d try to delete the cfg file (or maybe move it away). Maybe it works afterwards. If so, I would try to repeat the steps to remove the restricted variables again through the frontend.&lt;br /&gt;&lt;br /&gt;And then I would open a ticket with Liferay. Creating the file should work and your server should start up without an issue.</summary>
    <dc:creator>Christoph Rabel</dc:creator>
    <dc:date>2017-07-07T18:56:13Z</dc:date>
  </entry>
  <entry>
    <title>RE: Need Help with Freemarker WCM Templates</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=91546653" />
    <author>
      <name>Vincent G.</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=91546653</id>
    <updated>2017-07-07T12:01:51Z</updated>
    <published>2017-07-07T12:01:51Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;I have updated the patching-tool, downloaded the most recent patch and installed it. I deleted state folder (even portal/work, tomcat/temp and tomcat/work) and restarted, but I still get the error I mentioned earlier.&lt;br&gt;&lt;br&gt;Here's the output of the patching tool:&lt;br&gt;&lt;pre&gt;&lt;code&gt; D:\liferay-portal-dxp\patching-tool&amp;amp;gt;patching-tool.bat info
 Loading product and patch information...
 Product information:
   * installation type: binary
   * build number: 7010
   * service pack version:
     - available SP version: 3
     - installable SP version: 3
   * patching-tool version: 2.0.6
   * time: 2017-07-07 11:34Z
   * plugins: no plugins detected

Currently installed patches: de-22-7010
Available patches: de-7-7010, de-22-7010
Detailed patch list:
  [ -] de-7-7010 :: Currently not installed; Won't be installed: de-22 contains the fixes included in this one
  [*I] de-22-7010 :: Installed; Will be installed. :: Built for LIFERAY
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;I also did what was mentioned in the article under the link you posted and discovered, that the config file 'com.liferay.portal.template.freemarker.configuration.FreeMarkerEngineConfiguration.cfg' in portal/osgi/configs was modified and now contains the following:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;restrictedVariables = [Ljava.lang.String;@b6008b6
allowedClasses = [Ljava.lang.String;@426f3cdf
localizedLookup = false
macroLibrary = [Ljava.lang.String;@13aa8072
resourceModificationCheck = 60
restrictedClasses = [Ljava.lang.String;@46b9133a
templateExceptionHandler = rethrow&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Vincent G.</dc:creator>
    <dc:date>2017-07-07T12:01:51Z</dc:date>
  </entry>
  <entry>
    <title>RE: Need Help with Freemarker WCM Templates</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=91546446" />
    <author>
      <name>Christoph Rabel</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=91546446</id>
    <updated>2017-07-07T11:31:51Z</updated>
    <published>2017-07-07T11:31:51Z</published>
    <summary type="html">Oh, my.&lt;br /&gt;&lt;br /&gt;Now you are most likely hitting this issue:&lt;br /&gt;Please BE CAREFUL: There&amp;#39;s a bug, you need to enter something valid like &amp;#34;java.lang.String&amp;#34; into the allowedClasses field or otherwise Liferay 7 won&amp;#39;t start up after saving that form! That field must not contain an empty string! &lt;br /&gt;&lt;br /&gt;Upgrading to Patch 12 or SP2+ should fix that.&lt;br /&gt;&lt;br /&gt;Here&amp;#39;s a hint how to fix it manually:&lt;br /&gt;https://web.liferay.com/community/forums/-/message_boards/message/83643369&lt;br /&gt;&lt;br /&gt;P.S.:&lt;br /&gt;No idea why the cfg file doesn&amp;#39;t work. Everything looks correct.</summary>
    <dc:creator>Christoph Rabel</dc:creator>
    <dc:date>2017-07-07T11:31:51Z</dc:date>
  </entry>
  <entry>
    <title>RE: Need Help with Freemarker WCM Templates</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=91542088" />
    <author>
      <name>Vincent G.</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=91542088</id>
    <updated>2017-07-07T10:40:26Z</updated>
    <published>2017-07-07T10:40:26Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;To save time, I have simply done it via configuration in portal.&lt;br&gt;Next Error I'm getting is: &lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;10:30:54,310 ERROR [http-nio-8080-exec-1][error_jsp:670] javax.servlet.ServletException: javax.servlet.jsp.JspException: com.liferay.portal.kernel.template.TemplateException: Unsupported template manager ftl
javax.servlet.ServletException: javax.servlet.jsp.JspException: com.liferay.portal.kernel.template.TemplateException: Unsupported template manager ftl
	at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:905)
	at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:838)
	at com.liferay.taglib.servlet.PageContextWrapper.handlePageException(PageContextWrapper.java:164)
	at org.apache.jsp.html.common.themes.portal_jsp._jspService(portal_jsp.java:721)
&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Vincent G.</dc:creator>
    <dc:date>2017-07-07T10:40:26Z</dc:date>
  </entry>
  <entry>
    <title>RE: Need Help with Freemarker WCM Templates</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=91538233" />
    <author>
      <name>Vincent G.</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=91538233</id>
    <updated>2017-07-07T08:48:05Z</updated>
    <published>2017-07-07T08:48:05Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Yes, the file ist there.&lt;br&gt;And yes, I patched my instance recently.&lt;br&gt;&lt;br&gt;I deleted the folder (which seemed to help), started up and get an error:&lt;br&gt;&lt;pre&gt;&lt;code&gt;freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:_==&amp;amp;gt; serviceLocator.findService("com.liferay.portal.service.LayoutLocalService")&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;I looked into Config &amp;gt; Foundation &amp;gt; Freemarker and saw that nothing changed. Still, my config lies in &amp;lt;lr-portal&amp;gt;/osgi/configs and is somehow registered in the database aswell. If I look into *.configuration, I see a table 'com.liferay.portal.template.freemarker.configuration.FreeMarkerEngineConfiguration' with value 'felix.fileinstall.filename="file:/D:/liferay-portal-dxp/osgi/configs/com.liferay.portal.template.freemarker.configuration.FreeMarkerEngineConfiguration.cfg"&lt;br&gt;restrictedVariables=""&lt;br&gt;service.pid="com.liferay.portal.template.freemarker.configuration.FreeMarkerEngineConfiguration"'&lt;br&gt;&lt;br&gt;Is there any mistake I made?&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Vincent G.</dc:creator>
    <dc:date>2017-07-07T08:48:05Z</dc:date>
  </entry>
  <entry>
    <title>RE: Need Help with Freemarker WCM Templates</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=91537834" />
    <author>
      <name>Christoph Rabel</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=91537834</id>
    <updated>2017-07-07T08:18:32Z</updated>
    <published>2017-07-07T08:18:32Z</published>
    <summary type="html">Is the file &amp;#34;D:\liferay-portal-dxp\osgi\marketplace\Liferay Collaboration.lpkg&amp;#34; there?&lt;br /&gt;It&amp;#39;s in the Liferay Zip file, so it should be there.&lt;br /&gt;&lt;br /&gt;Did you, per chance, apply a Liferay patch(provided you are using EE)? You absolutely need to delete the osgi/state folder after patching. It might also help you here. Stop the server, delete the folder, start it again. It will take some extra time. Deleting the state folder is perfectly fine, it contains only &amp;#34;temporary&amp;#34; files.</summary>
    <dc:creator>Christoph Rabel</dc:creator>
    <dc:date>2017-07-07T08:18:32Z</dc:date>
  </entry>
  <entry>
    <title>RE: Need Help with Freemarker WCM Templates</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=91503994" />
    <author>
      <name>Vincent G.</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=91503994</id>
    <updated>2017-07-06T14:34:42Z</updated>
    <published>2017-07-06T14:34:42Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;div class="quote-title"&gt;Christoph Rabel:&lt;/div&gt;&lt;blockquote&gt;Hmm, that should work.&lt;br&gt;Did you restart after making that configuration?&lt;/blockquote&gt;&lt;br&gt; &lt;br&gt;I guess that was the problem. &lt;br&gt;Now, when I start up though, I am faced with a new Exception:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;
14:24:35,880 INFO  [Start Level: Equinox Container: e0d6a5d3-5662-0017-1f26-f84065a78e69][BundleStartStopLogger:35] STARTED com.liferay.util.taglib_2.5.1 [544]
06-Jul-2017 14:24:35.889 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class com.liferay.portal.spring.context.PortalContextLoaderListener
 java.lang.RuntimeException: java.nio.file.FileSystemNotFoundException: D:\liferay-portal-dxp\osgi\marketplace\Liferay Collaboration.lpkg
	at com.liferay.portal.spring.context.PortalContextLoaderListener.contextInitialized(PortalContextLoaderListener.java:256)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;Does this have to do with the configuration I made? Seems to have to do with marketplace although I did not modify it.&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Vincent G.</dc:creator>
    <dc:date>2017-07-06T14:34:42Z</dc:date>
  </entry>
  <entry>
    <title>RE: Need Help with Freemarker WCM Templates</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=91503877" />
    <author>
      <name>Christoph Rabel</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=91503877</id>
    <updated>2017-07-06T14:24:17Z</updated>
    <published>2017-07-06T14:24:17Z</published>
    <summary type="html">Hmm, that should work.&lt;br /&gt;Did you restart after making that configuration?</summary>
    <dc:creator>Christoph Rabel</dc:creator>
    <dc:date>2017-07-06T14:24:17Z</dc:date>
  </entry>
  <entry>
    <title>RE: Need Help with Freemarker WCM Templates</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=91503703" />
    <author>
      <name>Vincent G.</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=91503703</id>
    <updated>2017-07-06T13:58:11Z</updated>
    <published>2017-07-06T13:58:11Z</published>
    <summary type="html">&lt;div class="quote-title"&gt;Christoph Rabel:&lt;/div&gt;&lt;blockquote&gt;The issue is fixed in GA4.&lt;br /&gt;In any case, both given solutions work. You can either configure this in the frontend (but in GA3 you have to be a bit careful) or using the module configuration by file.&lt;br /&gt;&lt;br /&gt;Could you explain what you are doing?&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Sure. I have created a workspace and added a theme in folder themes/ that I created using the Theme Generator.&lt;br /&gt;I then created the file &amp;#39;com.liferay.portal.template.freemarker.configuration.FreeMarkerEngineConfiguration.cfg&amp;#39; as mentioned above inside &amp;lt;portal_home&amp;gt;/osgi/configs with the following content: restrictedVariables=&lt;br /&gt;&lt;br /&gt;Did I do something wrong?&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;EDIT: &lt;/strong&gt; I am using liferay-dxp-digital-enterprise-tomcat-7.0-sp1-20161027112321352</summary>
    <dc:creator>Vincent G.</dc:creator>
    <dc:date>2017-07-06T13:58:11Z</dc:date>
  </entry>
  <entry>
    <title>RE: Need Help with Freemarker WCM Templates</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=91503564" />
    <author>
      <name>Christoph Rabel</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=91503564</id>
    <updated>2017-07-06T13:45:17Z</updated>
    <published>2017-07-06T13:45:17Z</published>
    <summary type="html">The issue is fixed in GA4.&lt;br /&gt;In any case, both given solutions work. You can either configure this in the frontend (but in GA3 you have to be a bit careful) or using the module configuration by file.&lt;br /&gt;&lt;br /&gt;Could you explain what you are doing?</summary>
    <dc:creator>Christoph Rabel</dc:creator>
    <dc:date>2017-07-06T13:45:17Z</dc:date>
  </entry>
  <entry>
    <title>RE: Need Help with Freemarker WCM Templates</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=91503412" />
    <author>
      <name>Vincent G.</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=91503412</id>
    <updated>2017-07-06T13:23:04Z</updated>
    <published>2017-07-06T13:23:04Z</published>
    <summary type="html">I know this thread is a year old now, but when I search for &amp;#39;liferay dxp serviceLocator &amp;#39; this is the top result.&lt;br /&gt;Sad to see that there is no real solution provided to that problem.&lt;br /&gt;You can either use the control-panel, remove the restriction and hope your portal will work after that (if not, be faced with hours of additional work, I guess) or create that freemarkerengine config file as mentioned above.&lt;br /&gt;&lt;br /&gt;Sadly though, that config part doesn&amp;#39;t work for me! &lt;br /&gt;    Is there a new or better solution to this?&lt;br /&gt;    Do I have to do something for my OSGI configs to work?</summary>
    <dc:creator>Vincent G.</dc:creator>
    <dc:date>2017-07-06T13:23:04Z</dc:date>
  </entry>
</feed>
