Closed tkrch closed 2 weeks ago
@tkrch While this is working good, there is one extra bit of info that is still coming in. The content types are still getting assigned to the channel via the table [CMS_ContentTypeChannel]. This allows them to still be added as web page items on the imported channel.
Hi @tkrch & @farmergeek94 -- @twozero6, @bluemodus-gfuller , and I are working on a migration right now, and would like to use this feature. Is it safe for us to work off this branch, or should we wait? Does the time it's taking on review mean there are known issues or changes are coming?
Hi @bluemodus-mwills, yes some changes will be there, but not huge ones in terms how feature will be used. you can use this branch as a base. I will rebase it to master today.
@bluemodus-mwills rebased onto master branch, i will speed-up remaining work in order to deliver fully functioning feature.
Thank you, @tkrch !
Hi @bluemodus-mwills, @twozero6, @bluemodus-gfuller I have updated solution, interface (remodelling sample is unchanged). Only change from perspective of usage is removal of ConvertClassesToContentHub
appsettings.json option (the other option CreateReusableFieldSchemaForClasses
will be removed soon).
Sample AddReusableRemodelingSample
stays unchanged and can be used to configure conversion correctly.
There is one thing that not directly affects feature and that is - what to do with child pages (if any present) under converted page. (i will raise this for further planning)
EDIT: use this branch, but hopefully PR will be soon accepted
@tkrch does the latest change force you to handle the entire mapping manually? It was really nice to just specify a config entry and have everything map one to one without needing to set up all of the field mappings.
We are also using this currently for a migration. Hence the question.
@farmergeek94 yes, the setting was dropped in favour of mapping. Those 2 features were conflicting with each other, but if requested, it might return as form of "automapping" that would be configured through appsettings.json.
A more universal approach needs to taken, because there are multiple source types for conversion to content hub (custom classes, custom table or maybe basically anything if I implement mapping ability to load data).
@farmergeek94 I will re-introduce this setting next day back into this PR (for not breaking Your current process), but it will be replaced in future.
Thank you @tkrch !
Ok that makes sense. We can always fork that feature branch if we have to as well.
@akfakmot I've been working in this branch and I ran into a bit of an issue.
When I hit line 227, f is null and throws an exception. Even if I swap the fields around, it's always the last field that has the issue. I did a bit of digging and found that the form definition on line 139 in MigratePageTypesCommandHandler.cs is always missing the last field. It also has some unexpected things as if the form definition from the source was merged with the new one. I did make sure that my field names were unique. Is this something you could look into?
Also, I can start a new issue for this if you think it's appropriate. Is it possible to get the Node context in the ConvertFrom method? For example, I would like to get the node's NodeGUID so that I can do additional lookups (get children) before setting the value.
Hi @twozero6, i will look into it. From what I can see - You use for fields LinkMetaTextzzz
and LinkMetaAriazzz
same source field LinkText2
. That might be the issue, i will check if it is supported (If not not, I will add support).
@twozero6 that's the issue, fix is on the way
@twozero6 field cloning introduced, let me know if feature works for You and in Your case
@farmergeek94 requested feature re-introduced with handling of edge-cases. Please note, that in future, feature ConvertClassesToContentHub
will be replaced with more general approach.
@bluemodus-mwills, @bluemodus-gfuller feature is hopefully complete, if You have any feedback please share. Thanks TK
@tkrch the fix worked and I was able to import everything successfully. Thank you for the extremely fast turnaround!
Motivation
Continuation of #260 , #278