umbraco / Umbraco.Deploy.Issues

1 stars 0 forks source link

Umbraco.MultipleTextString is not transferred correctly #143

Closed greystate closed 1 year ago

greystate commented 1 year ago

When transferring a property using the Umbraco.MultipleTextstring propertyeditor, the values are squashed together in a single value.

Reproduction (updated versions)

Umbraco version: 10.2.1

Deploy version: 10.0.3

Steps to reproduce

Clone an environment to local (A) and start the site

Expected result

The content item should have the same two values in the environment (B) as on local (A)

AndyButland commented 1 year ago

Hi @greystate - I've been trying to replicate this this morning, but have not been able to I'm afraid. I see the expected result.

I'm using the latest Deploy version, 10.1.1. Are you on the same please?

greystate commented 1 year ago

Ah - thanks @AndyButland

I can see this is using Deploy 10.0.3 - so have probably been fixed already.

I'll try to get it upgraded soon then, and report back 👍

greystate commented 1 year ago

Hi again,

So I've now upgraded to Umbraco v10.3.2 and Deploy v10.1.2 and made sure the local clone have been built using the new versions as well.

I added a few more values to the MultipleTextstrings property and transferred it to the Development environment. They're still just beeing slammed into the first textbox...

In the log that's running on the local server, I can see that the value is transferred as:

"propertyAlias": {
    "": {
        "Value": "sValue1\nValue2\nValue3\nValue4\nValue5",
        "Segments": []
    }
}

So whether it's the receiver that doesn't parse the newlines correctly, or it's the sender not "packing" the right JSON, I don't know...

AndyButland commented 1 year ago

Mac v Windows maybe? Will have a look further next week, but I suspect it's something about newlines as you suggest.

greystate commented 1 year ago

That's a possibility - wouldn't be the first time in history newlines behaved differently on a Mac vs. a PC 😁

greystate commented 1 year ago

Definitely is a Mac vs. PC thing - just did a transfer from DEV to LIVE where everything went over correctly (which I assume all happens on PCs somewhere in the cloud 😆 )

ronaldbarendse commented 1 year ago

@greystate Thanks for reporting this issue! This is indeed an issue specific to the Umbraco.MultipleTextstring and it's use of Environment.NewLine to join/split the multiple text string values.

Although we can fix this issue within Deploy by normalizing the newlines before transferring the content on the source environment and then changing it to use the Environment.NewLine of the destination environment again, that would be more of a workaround.

Instead, I've created a fix for the CMS (see PR https://github.com/umbraco/Umbraco-CMS/pull/13569) that ensures existing data can be correctly parsed (split) and uses a consistent, normalized, newline when saving the (joined) value to the database.

greystate commented 1 year ago

That's great Ronald 🙌

AndyButland commented 1 year ago

I'll close this issue now given the related fix in the CMS has been tested and merged in. It's due in CMS release 10.4 and 11.1.