[MULTISITE-99] getBrowserLink adds unwanted locale prefix when using HierarchyBasedI18nContentSupport Created: 25/Sep/20  Updated: 24/Mar/21

Status: Open
Project: Magnolia Multisite Module
Component/s: None
Affects Version/s: 2.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Teresa Miyar Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: regression
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Magnolia 6.2.2 on Tomcat


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

 Description   

Setting HierarchyBasedI18nContentSupport as the i18n support on a site with the following structure and just the fallback site definition, (de as fallback locale)

/siteroot/de/en
/siteroot/de/de

Produces proper website links line domain/siteroot/de/en/home
but when using content app elements, the url adds the unwanted locale domain/en/siteroot/de/en/home

Workaround extend MultiSiteLinkTransformerManager with the following

@Override
    public AbsolutePathTransformer getAbsolute() {
        AbsolutePathTransformer transformer = getAbsolute(true);
        transformer.setUseI18N(false);
        return transformer; 
    }

Generated at Mon Feb 12 06:06:24 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.