Inserting duplicate LocaleResourceKey

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 13 años
Server Error in '/nopcommerce' Application.
--------------------------------------------------------------------------------

Cannot insert duplicate key row in object 'dbo.Nop_LocaleStringResource' with unique index 'IX_Nop_LocaleStringResource'.
The statement has been terminated.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Cannot insert duplicate key row in object 'dbo.Nop_LocaleStringResource' with unique index 'IX_Nop_LocaleStringResource'.
The statement has been terminated.

Source Error:


Line 209:
Line 210:            _context.Log.AddObject(log);
Line 211:            _context.SaveChanges();
Line 212:
Line 213:            return log;


Source File: D:\Instances\nopCommerce\Libraries\Nop.BusinessLogic\Audit\LogService.cs    Line: 211
Hace 13 años
Seems that you entered already existing resource name when trying to insert a new locale resource record.
Hace 13 años
Yes, that's true, but shouldn't this scenario be handled with a nice warning message instead of a hard exception? ;-)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.