We have problem with field localizations:
As you see in the image above the fields doesn’t read the localization. Translations/localizations exist in the resx files for each language/culture but they still doesn’t fetch them.
The strange part is that this works fine localy but not on our test or preflight/prod environment.
The implementation of InitFields()
looks as below:
private void InitFields(IEnumerable<FieldDefinition> fields)
{
foreach (var item in fields)
{
var currentField = _fieldDefinitionService.Get(item.AreaType, item.Id);
if (currentField == null)
{
if (IsAlreadyExecuted<RelationshipType>(item.Id))
{
continue;
}
_fieldFrameworkSetupLocalizationService.Localize(item);
_fieldDefinitionService.Create(item);
currentField = _fieldDefinitionService.Get(item.AreaType, item.Id);
}
else
{
currentField = currentField.MakeWritableClone();
if (item.FieldType != currentField.FieldType)
{
currentField.FieldType = item.FieldType;
}
_fieldFrameworkSetupLocalizationService.Localize(currentField);
_fieldDefinitionService.Update(currentField);
}
if (item.MultiCulture != currentField.MultiCulture)
{
this.Log().Error($"Accelerator \"{item.Id}\" field with \"MultiCulture\" setting and \"{item.MultiCulture}\" value can't be created. The system already has the \"{currentField.Id}\" field with \"MultiCulture\" setting and \"{currentField.MultiCulture}\" value. Accelerator deployment would fail.");
continue;
}
SetAlreadyExecuted<FieldDefinition>(item.Id, item.AreaType.Name);
}
}
What could cause this problem?
Litium version: [7.4.2]