I am trying to implement Umbraco headrest project from Matt Brailsford. I have cloned the project from github and followed the instructions for setting it up for the Umbraco v8. I setup default umbraco starter kit and tried the basic setup for headrest with mapping from Home node to HomePageViewmodel as in
I am still strugling with a solution for this error. I found another error message "Method may only be called on a Type for which Type.IsGenericParameter is true."
Umbraco headrest/headless V8
I am trying to implement Umbraco headrest project from Matt Brailsford. I have cloned the project from github and followed the instructions for setting it up for the Umbraco v8. I setup default umbraco starter kit and tried the basic setup for headrest with mapping from Home node to HomePageViewmodel as in
https://github.com/mattbrailsford/umbraco-headrest/tree/wip/v8
I am getting an error : InvalidOperationException: Don't know how to map Umbraco.Web.PublishedModels.Home to test.headrestv8.HomePageViewModel.
Here is the code for Configuration component is:
Right now i am only trying to map one field. The code for MapDefinition is:
The code ViewModel is:
I can't figure out whats going wrong or did i set it up in a wrong way? Any help would be really appreciated.
I am still strugling with a solution for this error. I found another error message "Method may only be called on a Type for which Type.IsGenericParameter is true."
at
((System.RuntimeType)((System.Reflection.RuntimeMethodInfo)($exception).TargetSite).DeclaringType).DeclaringMethod
Is there any one who has faced the similar error? or any thoughts guys ?
Hi Qaisar
I'm hitting the exact same problem after setting it up. Did you ever find a solution to this?
Hi Neils
I got it fixed by using the same naming convention. You can also try to look at the following project from Matt, its based on headrest.
https://github.com/mattbrailsford/nullorwhitespace-backend
Hi Qaisar
With a little more digging it seems my naming conventions were wrong, namely calling a class - HeadRestComposer
Changing my Composer Class name so it didn't crash with HeadRestComposer seems to have fixed it.
I've not seen that NullOrWhiteSpace project before, I'll look into it, thanks!
is working on a reply...