U4-6375 - cannot sort prevalues of DropdownlistMultiplePublishKeys - umbraco 7.2.1

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


1 Attachments


Jim Gettrup 17 Mar 2015, 11:35:25

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.

Jim Gettrup 17 Mar 2015, 11:39:10

By the way, it also affects the CheckBoxList and the ordinary DropDownList.

Kevin Giszewski 29 May 2015, 16:03:23

This affects CheckboxList as well

Carlos 09 Jun 2015, 17:18:25

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.

Carlos 09 Jun 2015, 19:19:09

I included a screenshot of a before and after. Of our issue. looks the same.

Kevin Giszewski 16 Jun 2015, 14:52:53

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.

Kevin Giszewski 16 Jun 2015, 19:34:26

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.


Kevin Giszewski 16 Jun 2015, 19:37:57

Related to this: http://issues.umbraco.org/issue/U4-5670

Priority: Normal

Type: Bug

State: Fixed


Difficulty: Normal

Category: UI

Backwards Compatible: True

Fix Submitted: Pull request

Affected versions: 7.2.6

Due in version: 7.3.0


Story Points: