You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 15/umbraco-cms/tutorials/migrating-macros.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,12 +17,12 @@ At the end of the article a few [other ways of running a larger migration is exp
17
17
18
18
Through the following tutorial, a macro will be converted one-to-one to a block. Each macro parameter will match the same named property on an Element Type. Text strings will be used as values.
19
19
20
-
If your migration deals with more complex types, it is advised to create an instance of the new data format and compare the old value against the new. There might be more differences between the Parameter Type on the macro and the Property Editor/Data Type on the Element Type.
20
+
If your migration deals with complex types, it's advised to create instances of the new data format and compare the old and new values. There might be more differences between the Parameter Type on the macro and the Property Editor/Data Type on the Element Type.
21
21
22
22
{% hint style="info" %}
23
23
**Upgrading from Umbraco 13**
24
24
25
-
As most people will be dealing with this migration when upgrading from Umbraco 13 LTS, that will be including in this tutorial. Specifically from 13.7.2 to 15.2.3.
25
+
As most people will be dealing with this migration when upgrading from Umbraco 13, that will be including in this tutorial. Specifically from 13.7.2 to 15.2.3.
26
26
27
27
This will also work when migrating directly from 13 to 17.
28
28
{% endhint %}
@@ -231,7 +231,7 @@ Note that:
231
231
232
232
The example below shows the full handling of an invariant macro to an invariant block.
233
233
234
-
This migrator starts and ends with a raw (serialized) string. If you chose to go any of the other ways in the next steps, you might have to change the code to work with the supplied value types instead.
234
+
This migrator starts and ends with a raw (serialized) string. If you choose a different path, you might have to change the code to work with the supplied value types instead.
@@ -365,7 +365,7 @@ public class CtaButtonMacroMigrator : IMacroMigrator
365
365
366
366
## Retrieving the data
367
367
368
-
In this setup, the values are received straight from the database using custom Data Transfer Objects (DTOs). This allows for getting just get the data needed. This example does not take nested data into account. For an example on how to to do this, [check out one of the alternatives](#alternative-approaches) at the bottom of this article.
368
+
In this setup, the values are received straight from the database using custom Data Transfer Objects (DTOs). This allows for getting get the data needed. This example does not take nested data into account. For an example on how to to do this, [check out one of the alternatives](#alternative-approaches) at the bottom of this article.
369
369
370
370
This example also only fetches the active (draft/current) version of the affected data to reduce processing time.
371
371
@@ -424,11 +424,11 @@ The next step is to fetch the value from the database using our custom `MacroPro
424
424
425
425
For each of the items found, run a regular expression that matches on the tag and alias.
426
426
427
-
The next step is to look in the list of migrators (more on that later) to find the correct one based on the alias found in the match. Then this needs to run.
427
+
The next step is to look in the list of migrators to find the correct one based on the alias found in the match. Then this needs to run.
428
428
429
429
When all macros have been converted for a given property, the updated value is saved in the database.
430
430
431
-
To get all the property IDs, the following `Report` method is used. The method returns a paginated report of all items that need to be migrated. It includes relevant document data and which migrator will run. This allows you easily test and debug specific values and migrators.
431
+
To get all the property IDs, the following `Report` method is used. The method returns a paginated report of all items that need to be migrated. It includes relevant document data and which migrator will run. This allows you test and debug specific values and migrators.
@@ -938,6 +938,6 @@ The proposed conversion logic should be adaptable to the system used in the loca
938
938
939
939
If you are using Umbraco Deploy in your solution, you can use its infrastructure to run the migration logic defined above.
940
940
941
-
To make this work, you have to update the alias of the rich text editor to something else, so that on import, a migration is triggered. See the [prevalue example](https://github.com/umbraco/Umbraco.Deploy.Contrib/blob/v15/dev/src/Umbraco.Deploy.Contrib/Migrators/Legacy/Content/PrevalueArtifactMigrator.cs) in the `Umbraco.Deploy.Contrib` package.
941
+
To make this work, update the alias of the rich text editor to something else. On import, a migration is triggered. See the [prevalue example](https://github.com/umbraco/Umbraco.Deploy.Contrib/blob/v15/dev/src/Umbraco.Deploy.Contrib/Migrators/Legacy/Content/PrevalueArtifactMigrator.cs) in the `Umbraco.Deploy.Contrib` package.
942
942
943
-
Next up, create a migrator to take handle any value that is of the special alias and convert them into a property with normal alias and updated value. For an example see the matching [prevalue property type migrator](https://github.com/umbraco/Umbraco.Deploy.Contrib/blob/v15/dev/src/Umbraco.Deploy.Contrib/Migrators/Legacy/Content/PrevaluePropertyTypeMigratorBase.cs).
943
+
Create a migrator to handle any value that is of the special alias and convert them into a property with the updated value. For an example see the matching [prevalue property type migrator](https://github.com/umbraco/Umbraco.Deploy.Contrib/blob/v15/dev/src/Umbraco.Deploy.Contrib/Migrators/Legacy/Content/PrevaluePropertyTypeMigratorBase.cs).
0 commit comments