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
Error will be received on the ToDictionary cast: "An item with the same key has already been added. Key: Admin.Configuration.Languages.Fields.FlagImage"
ImportResourcesFromXml should not allow duplicate inserts based on resource key.
The text was updated successfully, but these errors were encountered:
nopCommerce version: 4.30 and probably lower
Steps to reproduce the problem:
Use LocalizationService.ImportResourcesFromXml() to import duplicate resources.
Afterwards try to query the LocaleStringResource repository and cas toDictionary as ImportResourcesFromXml is doing :
var lsNamesList = _lsrRepository.Table.Where(lsr => lsr.LanguageId == language.Id).ToDictionary(lsr => lsr.ResourceName, lsr => lsr);
Error will be received on the ToDictionary cast: "An item with the same key has already been added. Key: Admin.Configuration.Languages.Fields.FlagImage"
ImportResourcesFromXml should not allow duplicate inserts based on resource key.
The text was updated successfully, but these errors were encountered: