We are in the process of upgrading to CMS 12 and Commerce 14 While trying to import products/delete resources using ICatalogSystem. This was working in 11/13
Now we get an error related to drafts. Looking into the code it looks that a draft is trying to be created in CatalogEntryAdmin
but the PrincipalInfo.CurrentPrincipal.Identity!.Name is null and then the whole metod SaveCatalogEntry fails.
Microsoft.Data.SqlClient.SqlException: 'Cannot insert the value NULL into column 'CreatedBy', table '@ContentDraft'; column does not allow nulls. INSERT fails.
The data for table-valued parameter "@ContentDraft" doesn't conform to the table type of the parameter. SQL Server error is: 515, state: 2
The statement has been terminated.'
I tried adding "DisableVersionSync": "true", in the appsettings. And that kind of worked as it didn't create the draft, but I'm wondering if there are other solutions
I will file a bug for this, thanks for bringing it into our attention, and apologies for the inconvenience. Maybe the workaround is to set PrincipalInfo.CurrentPrincipal before you executing said code?
Hi
We are in the process of upgrading to CMS 12 and Commerce 14 While trying to import products/delete resources using ICatalogSystem. This was working in 11/13
Now we get an error related to drafts. Looking into the code it looks that a draft is trying to be created in CatalogEntryAdmin
_catalogContentSync.CreateDraft(CurrentDto, PrincipalInfo.CurrentPrincipal.Identity!.Name);
but the PrincipalInfo.CurrentPrincipal.Identity!.Name is null and then the whole metod SaveCatalogEntry fails.
I tried adding "DisableVersionSync": "true", in the appsettings. And that kind of worked as it didn't create the draft, but I'm wondering if there are other solutions
Thanks,