Liferay 7.2 CE: enable custom keys for Widget TemplatesLiferay 7.2 CE: enable custom keys for Widget Templateshttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1172276462024-03-29T09:47:35Z2024-03-29T09:47:35ZRE: Liferay 7.2 CE: enable custom keys for Widget TemplatesAlessandro Candinihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1173904712019-10-07T15:17:50Z2019-10-07T15:17:50Z<html><head></head><body>I've found that the configuration is correct, but probably Liferay has a bug.<br>In the images attached, you can see inside red rectangles what appears in the interface with the above configuration: a not resolved language key for structures and only a label for templates: in both cases no input text fields at all to set a custom key.<br>I've found a workaround with a groovy script, updating the structure/template key after their creation:<br><pre><code>def structureName = "EXISTENT-STRUCTURE";
def newStructureKey = "NEW-KEY"; def query = "UPDATE DDMStructure SET structureKey='"+newStructureKey+"' WHERE name like '%"+structureName+"%';";
def result = com.liferay.portal.kernel.dao.db.DBManagerUtil.getDB().runSQL(query); </code></pre><br>and<br><pre><code>def templateName = "EXISTENT-TEMPLATE";
def newTemplateKey = "NEW-KEY"; def query = "UPDATE DDMTemplate SET templateKey='"+newTemplateKey+"' WHERE name like '%"+templateName+"%';";
def result = com.liferay.portal.kernel.dao.db.DBManagerUtil.getDB().runSQL(query);
</code></pre>---<br><strong>EDIT</strong>: I've opened a <a href="https://issues.liferay.com/browse/LPS-103010">related bug to this</a>.</body></html>Alessandro Candini2019-10-07T15:17:50ZRE: Liferay 7.2 CE: enable custom keys for Widget TemplatesAlessandro Candinihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1173570572019-10-04T15:49:32Z2019-10-04T15:49:32ZI've just realized that the above configuration works only for Widget Templates...for Web Content Structures and Templates does not work and keys continue to be autogenerated. Any suggestions? Thank youAlessandro Candini2019-10-04T15:49:32ZRE: Liferay 7.2 CE: enable custom keys for Widget TemplatesAlessandro Candinihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1172286292019-09-20T12:29:29Z2019-09-20T12:29:29Z<html><head></head><body>Thank you Christoph, that's correct!<br>As additional info, I've exported configuration files and put them inside <em>osgi/configs</em> directory of my application server:<br><ul style="list-style: disc outside;"><li><strong>com.liferay.dynamic.data.mapping.web.configuration.DDMWebConfiguration.config</strong><br><pre><code>autogenerateStructureKey="false"
autogenerateTemplateKey="false"
changeableDefaultLanguage="false"</code></pre></li><li><strong>com.liferay.journal.web.configuration.JournalWebConfiguration.config</strong><br><pre><code>autogenerateDDMStructureKey="false"
autogenerateDDMTemplateKey="false"
changeableDefaultLanguage="false"
defaultDisplayView="descriptive"
displayViews=[ \
&nbsp; "icon", \
&nbsp; "descriptive", \
&nbsp; "list", \
&nbsp; ]
journalArticleForceAutogenerateId="true"
journalArticlesSearchWithIndex="true"
journalBrowseByStructuresSortedByName="true"
journalDDMTemplateLanguageTypes=[ \
&nbsp; "ftl", \
&nbsp; ]
journalFeedForceAutogenerateId="true"
maxAddMenuItems="7"
showAncestorScopesByDefault="false"
showFeeds="false</code></pre></li></ul></body></html>Alessandro Candini2019-09-20T12:29:29ZRE: Liferay 7.2 CE: enable custom keys for Widget TemplatesChristoph Rabelhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1172306732019-09-20T11:23:26Z2019-09-20T11:23:26ZI think, you can find the checkboxes here:<br />Control Panel -> Configuration -> System Settings (Content and Data) -> Dynamic Data Mapping<br />Control Panel -> Configuration -> System Settings (Content and Data) -> Web Content -> Administration<br />Uncheck the autogenerate structure/template key checkboxes.Christoph Rabel2019-09-20T11:23:26ZLiferay 7.2 CE: enable custom keys for Widget TemplatesAlessandro Candinihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1172276452019-09-20T10:46:17Z2019-09-20T10:46:17ZHi, what is the portal property in Liferay 7.2 CE that enables me to define a custom key f