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

Multilingual site with same products shows unexpected behaviour #2181

Open
stephanonline opened this Issue Oct 4, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@stephanonline

stephanonline commented Oct 4, 2018

We have a running application that has trouble with products that are available on multiple languages within thesame Umbraco instance. We have set up 2 sites, an .nl and .com website.

.com is showing the english content (set as default)
.nl is showing the dutch content.

The domain is configured with the corresponding culture on the domains. So from Umbraco point of view everything is looking OK. Whenever we have an overview of the products, we see that it is showing 1 of the 2 contents.

On the initial startup of the application the product sticks to that language and parent node that is retrieved from the Initializing on the ProductContentFactory.
Whenever you set SpecifyCulturethis will only translate/mutate the product instance (in the cache) and not the parent node.

I think this will be an issue too when specifying routes per language, it'll probably work at some point for the product itself, but the wrapping content (menu etc..) will still be the the language that was loaded at startup.

As a workaround, I had to remove the cache from: VirtualContentCache<IProductContent>.GetByKey(Guid)

And get the current language and parent content within the domain when calling the ProductContentFactory.BuildContent(ProductDisplay)

@YodasMyDad

This comment has been minimized.

Show comment
Hide comment
@YodasMyDad

YodasMyDad Oct 17, 2018

Contributor

Could you provide some more code as to how you worked around this and where?

Contributor

YodasMyDad commented Oct 17, 2018

Could you provide some more code as to how you worked around this and where?

@stephanonline

This comment has been minimized.

Show comment
Hide comment
@stephanonline

stephanonline Oct 17, 2018

I forked the repo and made the change in 2.4.0 branch since we are using this version: stephanonline@5136918

stephanonline commented Oct 17, 2018

I forked the repo and made the change in 2.4.0 branch since we are using this version: stephanonline@5136918

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment