Problem accessing structure field when localizedProblem accessing structure field when localizedhttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=854576452024-03-28T21:53:06Z2024-03-28T21:53:06ZRE: Problem accessing structure field when localizedFernando Fernandezhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=855815642017-02-03T09:54:04Z2017-02-03T09:54:04ZThis seems to be a bug, so I opened issue <a href="https://issues.liferay.com/browse/LPS-70430">LPS-70430</a> in Jira.Fernando Fernandez2017-02-03T09:54:04ZRE: Problem accessing structure field when localizedFernando Fernandezhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=855683832017-02-02T23:42:26Z2017-02-02T23:42:26ZI must correct myself.<br /><br />The getData() in the template works well for all locales if called by a WCD in a page with nothing else.<br /><br />But If I add another simple WCD with a dummy text the getData() stops working for all but the default locale. I mean, the getData for non-localizable fields. For the localizable fields it works OK.<br /><br />The problem exists both in Velocity and Freemarker templates.<br /><br />FernandoFernando Fernandez2017-02-02T23:42:26ZRE: Problem accessing structure field when localizedFernando Fernandezhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=854836772017-02-01T10:48:52Z2017-02-01T10:48:52ZThe stranger thing with this issue is that the problem exists only when the template is being used in an asset publisher on a display page. <br /><br />If I put a web content display with this particular content/template the getData() method returns the correct localized content in any language...<br /><br />FernandoFernando Fernandez2017-02-01T10:48:52ZProblem accessing structure field when localizedFernando Fernandezhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=854576442017-01-31T21:58:33Z2017-01-31T21:58:33Z<html><head></head><body>Hi guys,<br><br>I'm creating a template for a custom structure with localizable fields mixed with non-localizable fields. This in 6.2 CE with Velocity.<br><br>To simplify, let's say my structure has two fields: name (text), localizable and picture (a d&m link), non-localizable.<br><br>Now, the user has created a web content with this structure with a base locale of pt_PT and a translation for en_US. The user has input name in the two languages but the web content editor only asked for the default locale picture - and that's the expected behaviour.<br><br>The problem is that in the template I'm accessing the picture url with <br><pre><code>$Picture.getData()</code></pre><br>but this only works when the user has the default language selected (pt_PT). As soon as the user switches to en_US, the method result becomes empty.<br><br>Since getData() does not h