[PAGES-588] Language tag in spa renderer misses the country in the url Created: 27/Apr/22  Updated: 19/May/22  Resolved: 11/May/22

Status: Closed
Project: Magnolia pages module
Component/s: None
Affects Version/s: None
Fix Version/s: 6.2.18

Type: Bug Priority: Critical
Reporter: Tobias Kerschbaum Assignee: Phong Le Quoc
Resolution: Fixed Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: 5d 4.75h Time Spent: 5d 4.75h
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Issue Links:
relation
is related to MGNLREST-374 magnolia-rest-content-delivery should... Open
is related to MGNLFE-194 Don't work with lang param that inclu... Closed
is related to MGNLREST-369 BadRequestException is swallowed Closed
is related to MGNLREST-373 magnolia-rest-content-delivery does n... Closed
is related to MGNLPN-631 Update to a new version of magnolia-r... Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
PAGES-589 Add mising language tag Sub-task Completed Phong Le Quoc  
PAGES-590 Review PR Sub-task Completed Canh Nguyen  
PAGES-593 PiQA Sub-task Completed Chuong Doan Huy  
PAGES-594 QA Sub-task Closed Rishab Dhar  
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* 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:
Sprint: DevX 9
Story Points: 3

 Description   

Steps to reproduce

  1. Define a site definition in English and Chinese. (English as fallback)
<site config>:
  [...]
  i18n:
    [...]
    fallbackLocale: en
    locales:
      en:
        enabled: true
        language: en
        country: 
      zh_CN:
       enabled: true
       language: zh
       country: CN
  1. Set up a template with the new spa renderer
[...]
routeTemplate: /{language}{{@path}}
[...]
  1. Open the pages app and switch the language to Chinese

Expected results

I would expect to see the content translated into Chinese.
And if I click on the open page in a new tab, I would expect to see a URL like this:
https://<URL to my system>/zh_CN/<path of my page>

Actual results

I see the fallback content in English and if click on the open page in a new tab I see the following URL:

https://<URL to my system>/zh/<path of my page>

Workaround

As far as I could see, there is no workaround for this problem!



 Comments   
Comment by Christopher Zimmermann [ 27/Apr/22 ]

plequoc please note that its possible (likely) not a problem in FE helpers libraries but in Pages module (or even other module.)

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