U4-4520 - Issue: MultipleTextStringValueConverter returns an empty string array due to mismatched XML value format

Created by Robert Foster 25 Mar 2014, 10:14:48 Updated by Stephan 26 Mar 2014, 07:09:30

The issue arises that entering one or more items in the MultipleTextString control results in the values being stored as a NewLine delimited string while the Value Converter expects them in a properly formatted XML Node structure of Values.

I've verified this in 7.0.4 and 7.1.0

Reference: https://github.com/umbraco/Umbraco-CMS/blob/7.1.0/src/Umbraco.Web/PropertyEditors/MultipleTextStringPropertyEditor.cs#L151-L160 compare to: https://github.com/umbraco/Umbraco-CMS/blob/7.1.0/src/Umbraco.Core/PropertyEditors/ValueConverters/MultipleTextStringValueConverter.cs#L20-L44

Fix would be to add the following block of code right before the return statement:

// Fall back on "legacy behaviour - legacy property editor saved this data as new line delimited if (!values.Any()) { return sourceString.Split(Environment.NewLine.ToCharArray()); }

An appropriate note would be required to indicate that this needs to be changed in future.


Sebastiaan Janssen 25 Mar 2014, 19:18:52

@Shandem Can you check if this is the correct fix please?

Shannon Deminick 25 Mar 2014, 23:59:16

I've tested this and this fix works - I now need to as @Stephen why the xml logic was in there in the first place.

Stephan 26 Mar 2014, 07:09:30

And yet the multiple textstring is documented as storing its values as XML? http://our.umbraco.org/documentation/Using-Umbraco/Backoffice-Overview/Property-Editors/Built-in-Property-Editors/Multiple-Textstring

Priority: Normal

Type: Bug

State: Fixed

Assignee: Shannon Deminick

Difficulty: Very Easy


Backwards Compatible: True

Fix Submitted:

Affected versions: 7.1.0, 7.0.4

Due in version: 7.1.0


Story Points: