[MAGNOLIA-4388] i18n wrapper doesn't return value for alternative language when default language value is not defined Created: 25/Apr/12 Updated: 26/Jul/12 Resolved: 26/Apr/12 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | i18n |
| Affects Version/s: | 4.5.2 |
| Fix Version/s: | 4.5.3 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Jan Haderka | Assignee: | Federico Grilli |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Template: |
|
||||||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||
| Description |
|
Whend value of the property is not defined in default language, it won't be visible also for alternative languages.
|
| Comments |
| Comment by Federico Grilli [ 26/Apr/12 ] |
|
Turned out that info.magnolia.jcr.util.PropertyUtil.getString(Node, String, String) is called by a bunch of STKTemplatingFunctions methods. In there the wrapped node is probed for the existence of a given property. Now, in this case no default is present but only a locale variation (eg, 'foo_de' is there but not 'foo') so wrappedNode.hasProperty("foo") would return false. However, when wrapped node is an instance of I18nNodeWrapper it obviously has to take into account the possibility that no default is defined and still there's a locale variation of it. |