Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Variant content migration (v8 -> v10+) #225

Open
KevinJump opened this issue Oct 4, 2023 · 2 comments
Open

Support Variant content migration (v8 -> v10+) #225

KevinJump opened this issue Oct 4, 2023 · 2 comments
Labels
up-for-grabs Open to being fixed

Comments

@KevinJump
Copy link
Member

At the moment we don't support migrating variant content - which is only a convert issue

The migrator(s) have been built (at the moment) to convert the content values

<pageTitle>
      <Value><![CDATA[Page Title]]></Value>
</pageTitle>

but in v8+ content might have multiple values :

<pageTitle>
      <Value Culture="cy"><![CDATA[Welsh Page]]></Value>
      <Value Culture="en-us"><![CDATA[Page Title]]></Value>
</pageTitle>

So we need to change the logic a bit to cope with their being multiple values.

In theory its simple enough but the edge cases make it a bit of an intelectual challenge.

there are splittng and merging migratiors that may take a single value

<complexProperty>
      <Value><![CDATA[[{"one": "one", "two": "two"]]>></Value>
</complexProperty>

and make it

<propertyOne>
      <Value><![CDATA[[One]]>></Value>
</propertyOne>
<propertyTwo>
      <Value><![CDATA[[Two]]>></Value>
</propertyTwo>

so with multple values these get complex.

now they are super rare, and at the moment there might not be any of these for a v8 to v10 site, so we could just say the splitters and mergers will work as they do but won't support multi-lingual, but for normal properties we do support multilingual

and just fix the core case ?

anyway - up for grabs.

this in the sharedContentBaeHandler : https://github.com/Jumoo/uSyncMigrations/blob/main/uSync.Migrations/Handlers/Shared/SharedContentBaseHandler.cs#L120-L163

likely needs splitting up a bit with somebits going into the v8 sharedContentBase handler ??
https://github.com/Jumoo/uSyncMigrations/blob/main/uSync.Migrations/Handlers/Eight/ContentBaseMigrationHandler.cs

@KevinJump KevinJump added the up-for-grabs Open to being fixed label Oct 4, 2023
@CodingDK
Copy link
Contributor

Hello @KevinJump

I have made a working solution for the culture variant issue here: CodingDK@5faaf22
I know it may not be the most beautiful solution - but it solved my problem. :-)

I've also made some other fixes that might be worth looking at.
https://github.com/CodingDK/uSyncMigrations/commits/main
Feel free to take a look and let me know if you have any questions

@khraibani
Copy link

Hello @CodingDK and @KevinJump I have a multi-lingual, multi-tenant running on U8 v8.18.12 I have managed to migrate the ContentTypes, DataType, Media etc but without the actual content the migration pack didn't contain it. Is that due to the variants? What is the best way to migrate the content across?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
up-for-grabs Open to being fixed
Projects
None yet
Development

No branches or pull requests

3 participants