[MGNLETK-129] ETKSiteManager#getAssignedSite always returns the Default site for locale prefixed uri's Created: 17/Dec/14  Updated: 23/Dec/14  Resolved: 18/Dec/14

Status: Closed
Project: Extended Templating Kit (closed)
Component/s: None
Affects Version/s: 2.0.21
Fix Version/s: 2.0.23

Type: Bug Priority: Neutral
Reporter: Christopher Zimmermann Assignee: Philip Mundt
Resolution: Fixed Votes: 0
Labels: support
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MULTISITE-34 MultiSiteManager#getAssignedSite alwa... Closed
dependency
is depended upon by MGNLDIFF-80 i18n aware comparison doesn't work in... Closed
Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

The DIFF between versions of a foreign language page on a multi-site instance fails because ETKSiteManager#getAssignedSite always returns the default site when the URI it is evaluating has a locale prefix such as "/fr/mysite".

This is because none of the default rules used in getAssignedSite() handles URI's with this locale prefix, and so it falls back to returning the default site. Possible fix is to update SiteNameMatcher to also attempt matches with the locale prefixes for all of the Sites configured locales.

See linked MGNLDIFF-80 for how to reproduce.



 Comments   
Comment by Christopher Zimmermann [ 17/Dec/14 ]

Include check for locale prefixed url's (like /fr/mysite) in SiteNameMatcher so that ETKSiteManager.getAssignedSite works with i18n urls.

Comment by Philip Mundt [ 18/Dec/14 ]

I18nContentSupport-check should not be done in info.magnolia.module.extendedtemplatingkit.sites.matchers.SiteNameMatcher but rather in info.magnolia.module.extendedtemplatingkit.sites.matchers.NotEmptyHandleMatcher.

Generated at Mon Feb 12 01:48:45 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.