Orckestra / C1-CMS-Foundation

C1 CMS Foundation - .NET based, open source and a bundle of joy!
https://c1.orckestra.com/
Other
250 stars 109 forks source link

Items can't be duplicated with 8-char random string ID based data types #804

Open wwwysocki opened 2 years ago

wwwysocki commented 2 years ago

Repro:

  1. Create a global data type or page data folder (use defaults).
  2. For the GUID, select 8-char Random String
  3. Add at least 1 field, e.g. String (use defauls)
  4. (For page data folder type, add it to a page)
  5. Add an item of this type.
  6. Duplicate the item

Expected:

Duplicated OK

Actual:

A server error with an exception

System.ArgumentException: datasetParameter name: Key violation error. A data element with the same dataId is already added. Type: Test.Bzbz
at Composite.Plugins.Data.DataProviders.XmlDataProvider.XmlDataProvider.AddNew[T](IEnumerable`1 dataset)

Note:

Data types with IDs based on GUIDs or 4-char Random Strings seem to be working OK