We have moved to GitHub Issues
Created by Eran Meir 08 Mar 2015, 15:47:42 Updated by Shannon Deminick 24 Jun 2015, 09:43:44
whenever i try to sort pre values of DropdownlistMultiplePublishKeys i get the following error
"A pre value with the alias 0 already exists for this data type"
i opened a thread on the forums also on the subject
This bug also affects data types based on the Umbraco RadioButtonList, the CheckBoxList and the ordinary DropDownList in version 7.2.2. At the moment, to reorder the prevalues, I'm having to edit rows in the cmsDataTypePreValues table directly.
By the way, it also affects the CheckBoxList and the ordinary DropDownList.
This affects CheckboxList as well
This bug was submitted in 2014 on another issue. Has this not been figured out yet? Or put on the list of bug fixes. We are having the same issues.
I included a screenshot of a before and after. Of our issue. looks the same.
So after digging around and reverse engineering this, the issue appears to be with the fact that the alias of a prevalue changes based on the ordering in the editor. This causes this exception in the core as the query fails: https://github.com/umbraco/Umbraco-CMS/blob/7.2.4/src/Umbraco.Core/Persistence/Repositories/DataTypeDefinitionRepository.cs#L524-L532
I'm trying to wrap my head around how the alias gets generated server-side as it doesn't appear to be able to be adjusted in the editor.
I found a fix and I'm submitting a PR although it may not be received as 'elegant'. This issue affects all of these datatypes due to using the MultivalueController for prevalues. I made numerous attempts at trying to fix on the client side but the only thing I found that would actually fix it was server side. The list of broken core datatypes: "Umbraco.CheckBoxList", "Umbraco.DropDown", "Umbraco.DropDownMultiple", "Umbraco.DropdownlistMultiplePublishKeys", "Umbraco.DropdownlistPublishingKeys", "Umbraco.RadioButtonList".
This really should get fixed due to anyone who is new to Umbraco may get frustrated as the core data types simple can't sort.
Related to this: http://issues.umbraco.org/issue/U4-5670
Backwards Compatible: True
Fix Submitted: Pull request
Affected versions: 7.2.6
Due in version: 7.3.0