Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedded Asset in rich text field is not localized when using locale's wildcard #71

Open
mark-mishyn opened this issue Mar 23, 2022 · 2 comments

Comments

@mark-mishyn
Copy link

mark-mishyn commented Mar 23, 2022

When I'm requesting Entry or building it with ResourceBuilder().build() I'm facing strange behavior -- embedded assets are not localized.

During debugging I've checked raw API response and I see correct asset's URLs are there, but seems like there is some sort of a bug.

Complete example how to reproduce the bug is bellow.

def foo():
    client = contentful.Client(
        "xyz",
        "xyz",
        default_locale="en-US",
        api_url="preview.contentful.com",
    )
    entry = client.entry('qwerty12345', {"locale": "*"})

    # here rich text field contains Portuguese text, but embedded Asset is for default language (en-US)
    rich_text_field = entry.fields(locale='pt')['text']

Client version is contentful==1.13.1

@rubydog
Copy link
Collaborator

rubydog commented Oct 13, 2022

Hi @mark-mishyn, thanks for reporting the issue. It has been a while since you reported the issue. Did you find the bug/problem or fix yet?

@mark-mishyn
Copy link
Author

@rubydog I ended with fork and this ugly hot fix... but still use it in prod for almost a year:)
1a1e4f0?diff=split

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants