umbraco / Umbraco-CMS

Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
https://umbraco.com
MIT License
4.52k stars 2.69k forks source link

Partially wrong language when fetching content from Content Delivery API #17351

Open alekos-captureone opened 4 weeks ago

alekos-captureone commented 4 weeks ago

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

13.5.2

Bug summary

While fetching content from Content Delivery API, some parts of it are in the wrong language.

We recently migrated from v8 to v13 and we used to have nested content. After communication with support agents we migrated all our nested content into block lists but the problem still persists.

We also see this behaviour:

Specifics

We can give you access to the project if you need to look into the backoffice

https://dev-capture-one-cms.euwest01.umbraco.io/umbraco/delivery/api/v2/content/item/de?expand=properties[$all]&take=1000

Screenshot 2024-10-24 at 14 12 25

Screenshot 2024-10-24 at 14 15 27

Steps to reproduce

  1. Save and publish a page
  2. Fetch this pages content in a language (eg. Japanese)
  3. Fetch again this page in another language. Some parts will be in the language that was first fetched (Japanese in this case)

Expected result / actual result

No response

github-actions[bot] commented 4 weeks ago

Hi there @alekos-captureone!

Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.

We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.

We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.

Thanks, from your friendly Umbraco GitHub bot :robot: :slightly_smiling_face:

kjac commented 3 weeks ago

Hi @alekos-captureone,

Thanks for reaching out. Would I be correct in assuming you're using Nested Content for the buttons?

alekos-captureone commented 3 weeks ago

Hi @kjac, it was migrated from nested content to block list (as with all our content in the Dev environment).

image

kjac commented 3 weeks ago

Thanks @alekos-captureone 😄 I'll try to reproduce it

alekos-captureone commented 3 weeks ago

Thanks @kjac, I can also give you access to the environment if you want to check further.

kjac commented 1 week ago

Hi again @alekos-captureone. Sorry for the belated response, we've been rather busy with the V15 release.

I can't really reproduce this on V13. Here's my test content:

image

It's a block list with a nested block list. The nested block contains an URL Picker. The picked content is language variant and published in both English and Danish.

When fetching the English language variant:

image

...the resulting output contains the English version of the content picked in the URL Picker:

image

Similarly when fetching the Danish language variant:

image

...the resulting output contains the Danish version:

image

alekos-captureone commented 1 week ago

I see... Is there a way to see it in our own implementation and try to identify what is wrong and why we are getting this behaviour?

kjac commented 1 week ago

I would try invoking the endpoints from Swagger. Maybe use the "by ID" endpoint to root out any routing confusion. And remember to include the accept-language header.

Also - are we doing the same thing? Read: Is my test setup identical to yours (albeit a boiled down version)?

alekos-captureone commented 1 week ago

The setup looks the same, yes.

You can try GETting these endpoints:

First try German (you can also try it with the Accept-Language header) https://dev-capture-one-cms.euwest01.umbraco.io/umbraco/delivery/api/v2/content/item/de\?expand\=properties\[$all\]\&take\=1000

Then in English you should see the buttons (search for a "buttons" node) in german (both the names and the links will start with /de): https://dev-capture-one-cms.euwest01.umbraco.io/umbraco/delivery/api/v2/content/item/en\?expand\=properties\[$all\]\&take\=1000

kjac commented 3 days ago

@alekos-captureone I think the best approach here is to reproduce the setup in a simplified local version. If the problem still persist I'd be very interested in the resulting database. If the problem does not persist, perhaps you'll be able to figure out what differs between the dev environment and the simplified local version?

alekos-captureone commented 2 days ago

Unfortunately we are unable to identify what is different... It would be great if someone could have a look to our implementation and help us with what is wrong and we get mixed languages...