You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When site is saved, the culture is set from it's previous value (which is allways null since there is no input field for site culture).
Instead it should be stored from it's connected language culture.
Long time no see @Urreman!!! I think this is a backwards compatibility bug, like you say the property site.Culture is never used, it was used before the Language model was added. The current culture should be fetched from the selected Language of the current site.
We should however update the ApplicationService that can be accessed with @WebApp so that it automatically sets culture from the selected language.
Yeah, it's been a while, hope all is well :)
Also in the corresponding functionality in the RoutingMiddleware when
current culture is set from the site culture, it should be fetched from the
selected language instead.
Den mån 4 apr. 2022 kl 14:21 skrev Håkan Edling ***@***.***>:
Long time no see @Urreman <https://github.com/Urreman>!!! I think this is
a backwards compatibility bug, like you say the property site.Culture is
never used, it was used before the Language model was added. The current
culture should be fetched from the selected Language of the current site.
We should however update the ApplicationService that can be accessed with
@webapp so that it automatically sets culture from the selected language.
—
Reply to this email directly, view it on GitHub
<#1845 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAI7TH4PWIX7PBT773PULZTVDLNERANCNFSM5SPHOHUQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
When site is saved, the culture is set from it's previous value (which is allways null since there is no input field for site culture).
Instead it should be stored from it's connected language culture.
Possible solution:
https://github.com/PiranhaCMS/piranha.core/blob/master/core/Piranha.Manager/Services/SiteService.cs
public async Task Save(SiteEditModel model){
...
var language = await _api.Languages.GetByIdAsync(model.LanguageId);
if (language != null) {
site.Culture = language.Culture;
}
...
}
The text was updated successfully, but these errors were encountered: