[MGNLDIFF-80] i18n aware comparison doesn't work in multisite environment Created: 18/Aug/14 Updated: 23/Dec/14 Resolved: 18/Dec/14 |
|
| Status: | Closed |
| Project: | Magnolia Diff Module |
| Component/s: | None |
| Affects Version/s: | 1.2.2 |
| Fix Version/s: | 1.2.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Zarko Ivanoski | Assignee: | Philip Mundt |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | support | ||
| 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
|
||||||||||||||||||||||||
| Release notes required: |
Yes
|
||||||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||||||
| Visible to: |
Marcel Stör
|
||||||||||||||||||||||||
| Description |
|
This feature was implemented with DiffLink.getLocales() always return locales from default site because storageNode path start with "/activation/..." and not with actual site prefix. Instead getOriginalContent() should be used to aquire the proper node. To Reproduce:
|
| Comments |
| Comment by Zarko Ivanoski [ 12/Nov/14 ] |
|
Issue is not fix-ed yet. Only links that are rendered in dialog now are aware of current site and configured locales. But actual comparison still doesn't work. When you will click on the link and "/.magnolia/versionDiff" is opened, site is not resolved and default site is used. |
| Comment by Christopher Zimmermann [ 17/Dec/14 ] |
|
The problem in the DIFF module is VersionDiffHtmlServlet#getVersionSource is generating the default language url (english) rather than the correct url for the locale - one that is prefixed with the locale - (just 'mysite' instead of '/fr/mysite'). This happens because i18nContentSupport.toI18NURI(NodeUtil.getPathIfPossible(node)); is returning the wrong URL - and this is because the actual site is not set on the AggregationState and so AbstractI18nContentSupport.isLocaleSupported() returns false for french. Because french is indeed not in the locales collection for the Default site! Suggested solution is to put correct Site on the AggregationState in VersionDiffHTMLServlet.
|
| Comment by Christopher Zimmermann [ 17/Dec/14 ] |
|
VersionDiffHtmlServlet#getVersionSource now sets the correct site on the AggregationState so that proper i18n uri's will be returned by i18nContentSupport.toI18NURI(). |
| Comment by Philip Mundt [ 18/Dec/14 ] |
|
Locales should only be returned when I18nContentSupport of info.magnolia.module.templatingkit.sites.Site is enabled. |
| Comment by Christopher Zimmermann [ 18/Dec/14 ] |
|
Please see improvement on Branch |
| Comment by Philip Mundt [ 23/Dec/14 ] |
|
Removed fixVersions 1.6.2 and 1.5.5. For fix on 1.6.x refer to 1.5.x will not see the fix as the underlying i18n-ization (see |