U4-11574 - Dropdown flexible returns "System.String[]" if no option is picked on the node

Created by OleP 15 Aug 2018, 12:17:42 Updated by Sebastiaan Janssen 20 Aug 2018, 14:07:33

Relates to: U4-11272

Your report will have a greater chance of being addressed if you can give us clear steps to reproduce the issue, please answer the following questions in as much detail as possible:

What did you do?

  1. Created a new DataType using Dropdown Flexible, and added a few prevalues
  2. Added a field to a DocumentType using the DataType
  3. Create a node using the DocumentType, and don't choose any of the prevalues on the select

What did you expect to happen? Return an empty string or string[]

What actually happened? It returned System.String[] as a string

Comments

OleP 15 Aug 2018, 13:16:37

Just tested on a fresh install, to be sure it's not just wrong in my environment. But it happens on a fresh install too.


Sebastiaan Janssen 20 Aug 2018, 14:07:24

Fixed in https://github.com/umbraco/Umbraco-CMS/commit/e6597d47e30db6cacb0877ef6f6da1d8e4a13f2c

The behavior was correct if you set the datatype to accept multiple values, in that case you should always do a foreach over the results. But when configured as only having a single value we now return an empty string if nothing is selected.


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.12.0

Due in version: 7.12.1

Sprint:

Story Points:

Cycle: