[LIVECOPY-255] Localized content from the delivery endpoint Created: 11/Mar/21  Updated: 21/Jun/21  Resolved: 25/Mar/21

Status: Closed
Project: Live Copy
Component/s: None
Affects Version/s: 3.2.2
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Richard Gange Assignee: Yen Lac Tue
Resolution: Not an issue Votes: 0
Labels: VN-Maintenance, maintenance
Remaining Estimate: Not Specified
Time Spent: 7h 25m
Original Estimate: Not Specified

Attachments: XML File config.modules.multisite.config.sites.uk.xml    
Issue Links:
relation
is related to LIVECOPY-254 Investigate: Default language with tw... Closed
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:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Date of First Response:
Epic Link: Ext DAMs maintenance & partnership support
Sprint: Maintenance 50
Story Points: 3

 Description   

This ticket builds off of LIVECOPY-254. To simplify things we have a master with 2 languages and a slave which should only serve a single language. In the slave the single language to be served is not the default one but instead using _fr on the properties which hold the content.

When the language parameter is passed it appears to be ignored and just shows the default master language.

Reproduce
Site "be", which is the master and has "nl" and "fr" languages set up ("nl" is default)

Site "be-fr" is the livecopied site where I only want to server french. However, "nl" still occupies the default properties because it was copied.

"be" site:
When I query the rest API with http://localhost:8080/.rest/delivery/website/be?lang=fr - the "nl" content is shown. When I put the lang=all I get both languages back as expected (I've attached a file with the request response for lang=fr and lang=all for you to see).

"be-fr" site: When I query the rest API with http://localhost:8080/.rest/delivery/website/be-fr?lang=fr - the "nl" content is shown. When I put the lang=all I get both languages back as expected.

The pages are working as expected within the Magnolia UI, all languages are displayed correctly on page render and in dialogs.



 Comments   
Comment by Yen Lac Tue [ 25/Mar/21 ]

Hi luke.trueman

I see the issue happen in demo instance also, so it's not come from Livecopy module.

I tried with uk site config.modules.multisite.config.sites.uk.xml

Because there is no site returned when we call via rest API, so system will load the locales from "fallback" site. When I tried to update fallback/extends from ../travel to ../uk the rest response will return correct value.

Comment by Federico Grilli [ 25/Mar/21 ]

Extending the “master” livecopy site in the fallback site seems to do the trick - see also https://docs.magnolia-cms.com/product-docs/Developing/API/REST-API/Delivery-endpoint-AP[…]questing-localized-content-with-the-delivery-endpoint.html 

I would therefore close this ticket. Of course, feel free to reopen it if the above solution doesn't properly address the issue or if we misunderstood something  

Comment by Tomáš Gregovský [ 21/Jun/21 ]

hi guys (fgrilli, yen.lactue), also just came across this issue, unfortunately in our case we have multisite and one site+already configured fallback has languages configured in pattern of <language>_<country> (e.g. de_DE) , but additionally we have another site which is configured with only <language> (e.g. "de"), and in this case /.rest/delivery/pages/<site2>?lang=de dosn't work for us. 

Generated at Mon Feb 12 02:26:58 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.